Category:Updating and Automation
Although Q has a very powerful scripting language, most common objectives that users have when they automate are better addressed using the many automation tools built into Q.
Automatic updating tools
- Updating Projects with New or Revised Data
- Automatic Updating of PowerPoint and Excel Documents
- How to Use a Dashboard for Automated Reporting
- Automatically Updating R DataSets, Variables, and Outputs
Multiple selection
In various parts of Q it is possible to simultaneously change multiple things at the same time. For example:
- On the Tables/Outputs Tab, you can select multiple tables in the Report tree, and change their Filters, Weights, Statistics, Footers and the selections in the Blue and Brown Drop-down Menus all at the same time. The image below illustrates how this is done when selecting Statistics - Cells for multiple tables at the same time.
- In the Variables and Questions tab you can select multiple variables and move them, modify their Value Attributes and Variable Type settings at the same time.
Merging projects
Where multiple researchers have been working on the same data file, the data and outputs in the Q projects can be combined by dragging and dropping (see Merging Projects).
Find/Replace
Find Replace gives a high level of control about both where it searches and replaces and also about how to perform the search and replace. For example, you can:
- Use wildcards (e.g., have Q replace all text that starts with Please rate your).
- Use it to modify Expressions in JavaScript Variables.
Replication/Templating tools
- Where there are many similar questions in a project, and there is a need to modify each in the same way (e.g., merging together top 2 boxes and setting Don't Know as Missing Data), you can do this by:
- Creating a table of the question, and modifying it as per your needs.
- Automate > Online Library > Modifying Data - Use a Question as a Template for Modifying Other Questions.
- Where there is a need to create many similar JavaScript Variables, this can be done by first creating one variable, and then having Q automatically reproduce and modify this variable (see Use as Template for Replication).
- Charts can be saved as templates using View > Save as Template and reapplied to other charts in this and other projects using the View > Show Data as drop-down menu at the top of the screen.
- If exporting to Microsoft Office:
- Q can export using Microsoft Chart Templates.
- Q also automatically uses the page layout and theme settings within PowerPoint presentations (see Exporting to PowerPoint).
- Q allows you to select the Table style to use when exporting to Excel.
Rules and QScripts in the Online Library
Many things that users need to automate have already been automated in the form of Rules and QScripts, and can be found by selecting Automate > Online Library and searching for whatever is of interest.
Writing code (JavaScript)
In addition to its use for creating variables from within the Variables and Questions tab (see Creating New Variables), JavaScript can be used to:
- Automate the setup or modification of a project. For example, automatically create new variables, import data files, create tables, etc. JavaScript written for this purpose is referred to in Q as QScript. It is essentially equivalent to the idea of a Macro in Excel. Many QScripts have been created in the Online Library, and you can tailor them to your own purposes.
- Customizing tables and charts. For example, conditional formatting rules, modifying how significance tests are performed, etc. JavaScript written for this purpose is referred to as Table JavaScript and Plot JavaScript. Table JavaScript and Plot JavaScript is principally used for the creation of Rules. As with QScripts, many Rules are available from within the Online Library and you can use these or customize them as per your needs.
- Automating uploading of projects for online reporting (i.e., the API) - see Q API.
Subcategories
This category has the following 2 subcategories, out of 2 total.
Pages in category 'Updating and Automation'
The following 16 pages are in this category, out of 16 total.
H
- How Do I Automate Things Using Syntax?
- How to Address Changes in the Questionnaire in a Tracker
- How To Band Numeric Variables
- How to Create a Categorical Variable from Binary Variables
- How To Detect Changes in Trackers
- How to Use a Dashboard for Automated Reporting
- How to Use Search/Replace to Conditionally Recode Lots of Variables