Advanced mode provides a powerful, flexible way to define sub-populations using AskiaScript.
To define a condition in advanced mode:
Drag the questions or items to which you will apply a condition into the condition window.
Click
to save your condition.
Click OK to close the sub-population window.
Suppose we have a category question, with one possible answer, Men.
The expression we require is ??Gender??=1.
We double-click the question and drag it into the sub-population window, and add the expression ':1'. The screen appears as follows:
You can use the following operators in your expressions.
Between two (or in the case of NOT) before one boolean value
| OPERATOR | DESCRIPTION |
|---|---|
|
AND |
Logical and (must be both) |
| OR |
Logical or (must be one or the other or both) |
| NOT | Logical not (the inverse of the condition) |
Between two numerical values
| OPERATOR | DESCRIPTION |
|---|---|
|
> |
Greater than |
| < |
Less than |
| = |
Equal to |
| + |
Add |
|
- |
Subtract |
| * |
Multiply |
| / | Divide |
| Syntax | DESCRIPTION |
|---|---|
| ( ... ) | Parentheses may be used to change the priority order of combinations or to simplify readability. |
| { ... } |
Braces are used to define a set of values associated with a multiple response question, e.g. |
| ??...?? | Two question marks either side of a name indicate a variable name, e.g. ??Age?? |