Grammar
Basic Grammar
| Description | Keyword |
|---|---|
| Question | Q1 |
| Option | Q1A1 |
| Matrix Sub-question/Matrix Fill-in Row | Q1S1 |
| Matrix Sub-question Option/Matrix Fill-in Column | Q1S1A1 |
| Consecutive Questions | Q1~4 |
| Consecutive Options | Q1A1~4 |
| Consecutive Matrix Sub-questions | Q1S1~4 |
| Conditional Statement | if...then... |
| Answer Count | len Q1 |
| Answer Position | index Q1A1 |
| Comment | # This is a comment, it won't be executed |
| Year | 2020 |
| Year-Month | 2020-10 |
| Year-Month-Day | 2020-10-24 |
| Hour:Minute | 10:24 |
| Year-Month-Day Hour:Minute | 2020-10-24 10:24 |
note
When question numbers are consecutive for 3 or more items, they will automatically be converted to the form 1~3 after page refresh, for example:
Q1, Q2, Q3 # Combined into Q1~3
If there are fewer than 3 items or they are not in sequential order, they won't be combined:
Q1, Q2 # Not combined as there are fewer than 3 consecutive items
Q1, Q3, Q2 # Not combined as items are not in sequential order
Operators
| Description | Keyword |
|---|---|
| Logical AND | and |
| Logical OR | or |
| Logical NOT | not |
| Logical Grouping | () |
| Greater Than | > |
| Greater Than or Equal To | >= |
| Equal To | == |
| Less Than | < |
| Less Than or Equal To | <= |
Actions
| Keyword | Description | Example |
|---|---|---|
| hide | Hide question or option | hide Q1 |
| show | Show question or option (see notes below) | show Q1 |
| branch | Branch logic for question flow (commonly used in screening questions) | if Q1A1 then branch from Q1 to END |
| replace | Replace question content | replace "XXX" in Q2 title with Q1 |
| shuffle | Random ordering | shuffle Q1A1~3 |
| random show | Random selection | random show 1 from Q1~3 weight by 1:1:2 |
Functions
| Keyword | Description | Example |
|---|---|---|
| RANDBETWEEN | Generate a random integer | RANDBETWEEN(1,Q1) |
| LANG | Get respondent's language | LANG() |