Advanced Logic

Sample survey

This conditional transition means that the next question asked to respondents depends on their answer to this particular question or to the previous question(s) as well. Logic expression includes conditions combined and grouped in different ways. Logic conditions check if particular answers in the questions have been selected.

This logic transition is used to make flexible survey structures that allow users to dynamically organize their surveys. For example, a female vegetarian of 25-35 years will never get a question like this: "Which meat dishes do you prefer?".

To add an "Advanced Logic" transition to one of the questions in your survey click [Logic] next to the question on the 'Edit Questions' page, and then:

  1. Select he Advanced Logic option to apply this logical transition to the question if allowed.
  2. Create a new logic rule:
  3. Manage logic rules:

You can create as many logic expressions as you need and then turn them on or off depending on the current needs and requirements. For that use the Activate and Deactivate buttons next to the appropriate expressions.

Logic expression format:

To compose a logic expression that checks up if particular questions and answers have been selected follow this format:

  • Q1 checks up if any answer has been selected in question 1.
  • Q10.A3 checks up if answer 3 has been selected in question 10.
  • Q5.A2.C3 checks up if answer 2 has been rated in column 3 in question 5. (question type: 'Rate Different Items Along the Scale of Your Choice').
  • Q7.C5 checks up if any answer has been selected in column 5 in question 7. (question type: 'Rate Different Items Along the Scale of Your Choice').

Combining and Grouping

You can combine logic conditions using AND, OR and NOT operators as well as group them with parentheses ().

Logic operators:

  • Operator AND denotes that all the combined logic conditions are fulfilled. For example: if Q1.A1 AND Q1.A3 => Q4. It means that you will go to question 4 if both answer 1 and answer 3 are selected in question 1.
  • Operator OR denotes that at least one of the combined logic conditions is fulfilled. For example: if Q1.A1 OR Q1.A3 => Q4. It means that you will go to question 4 if either answer 1 or answer 3 is selected in question 1.
  • Operator NOT denotes that a logic condition is not fulfilled. You can put it at the beginning of a logic condition or after AND, OR operators. For example: if NOT Q1.A1 => Q4. It means that you will go to question 4 if answer 1 is not selected in question 1.
  • You can use AND, OR, NOT operators in the same logic expression simultaneously. Use parentheses to make your logic unambiguous. For example: if (Q1.A1 AND Q1.A3) OR NOT Q2.A3 => Q4. It means that you will go to question 4 if either both answer 1 and answer 3 are selected in question 1 or answer 3 is not selected in question 2.

Valid symbols in logic expressions

Valid symbols Examples
Letters: Q, A, C Q1, Q1.C4, Q2.A3
Numbers: 1-9, 10 - more Q9, Q23.A5
Dots: ... Q3.A5.C7
Operators: AND(=&&), OR (=||), NOT (=!) Q3.A1 AND Q3.A3, Q7.A3.C1 OR Q7.A3.C2, NOT Q2.A1
Parentheses: () (Q1 AND Q3.A2) OR (Q5.A1 AND Q5.A3)

Note: to use complex expressions with double brackets, insert spaces between the brackets:
( (Q1 AND Q3.A2) OR (Q5.A1 AND Q5.A3) ) AND (Q6.A2 OR Q6.A3)

Conventional statements in alert messages

Statements Examples
<EOF> (= end of logic expression)
<OPERAND> (= logic condition)
Q1.A2 AND - here the end of logic expression was encountered however logic condition (for example, Q1.A3) was expected.

Advanced Logic with text responses:

Additional Information: