This article covers rules that apply to all aytm Logic: which rule wins when two conflict, how to show square brackets to respondents, what is and isn't case sensitive, and how the system resolves several statements on the same element.
In This Article
Logic Priority
When rules conflict, the one with the higher priority wins. aytm Logic (1) is the highest.
-
aytm Logic: statements written in square brackets, such as
[skip to Q5 if Q2A3]or[hide if Q1A4]. See the aytm Logic section. -
Rabbits: skips set up with the rabbit icon on a question or an answer in the Survey Editor, in Direct mode or Random mode
- Organic flow: by default, questions are shown in order from first to last
Here's how that plays out after a respondent answers a question:
- A skip statement is checked before a rabbit. If the question has both, and the statement's condition is met, the respondent follows the statement. The rabbit applies only when no statement sends them elsewhere.
- Answer rabbits are checked before the question's rabbit. A rabbit on the selected answer wins over a rabbit on the question itself.
-
A skip can't land on a question the respondent isn't allowed to see. If the destination is hidden from them by
[show if]or[hide if], or they've already answered it, that skip is passed over. If no skip works, the respondent continues to the next question in order that they can see.
💡 Tip: If your survey already uses aytm Logic, write your skips as statements too (for example,
[skip to Q5 if Q2A3]) instead of rabbits, so all of your survey flow lives in one place.
Using Square Brackets
Square brackets start aytm Logic, so text in single brackets is hidden from respondents. To show square brackets, type them doubled. If you type [[optional]] in a field, the respondent sees [optional].
Text in double brackets is never read as logic. For example, [[show if Q1A1]] displays [show if Q1A1] to every respondent and doesn't show or hide anything.
Case Sensitivity
Commands, references, and variable names are not case sensitive. [Q1I] works the same as [q1i], and [SHOW IF Q1A1] works the same as [show if q1a1].
Text you compare inside a condition follows its operator:
-
=ignores case.[show if my_var = "yes"]also matches Yes and YES. -
likeis case sensitive.[show if my_var like "St"]matches Stop but not stop.
Combining Commands
You can put two or more statements on the same element, for example [show if Q2][hide if Q1A4][Q1i]. The system resolves each statement on its own, then combines the show and hide conditions with AND: the element appears only if every one of them allows it.
In this example:
-
[Q1i]places the image from Q1 in the element. -
[show if Q2]is true if the respondent saw Q2. -
[hide if Q1A4]is true unless the respondent selected Q1A4.
| Saw Q2? | Selected Q1A4? | Element |
|---|---|---|
| Yes | No | Shown |
| Yes | Yes | Hidden |
| No | No | Hidden |
| No | Yes | Hidden |
To build more complex conditions in a single statement, group them with parentheses and connect them with and, or, and not. For example, [Q1i if (Q1A1 or Q2A1) and not (Q3A1 or Q4A1)] shows the image from Q1 only to respondents who selected Q1A1 or Q2A1, and selected neither Q3A1 nor Q4A1.
⚠️ Note: If the respondent didn't see the question an image comes from, no image is shown.