Advanced logic is used to define questions that will be asked further depending on respondents answer(s) to a particular question.
Advanced logic may be implemented using Logic expressions. These expressions include conditions combined and grouped in different ways.
The conditions check if the particular answer(s) is selected and routes respondents according to the logic rules specified by the survey owner.
In order to activate Advanced Logic in the form or survey:
- Click the Logic button next to the needed question on the Edit Questions page.
- Select Advanced Logic and click "Add New" button to create new logic expression
- Customize new logic rule and click "Save" button
- Click "Activate" button to make the rule active, once it has been created.
There are two modes for composing Advanced logic rules - Simple and Advanced. When you click Add New button, the Simple mode constructor appears by default. With its help, you can easily pick needed questions, answer options and conditions from respective drop-downs and indicate a question or a page that would be shown next to those respondents who follow rules set below.
If you would like to set up a rule based on several conditions, use the plus button to add a line with another condition and connect them with the needed operator - AND or OR. If operator AND is selected connected conditions would need to be true at the same time. OR means that respondent would fit conditions if at least one of connected conditions is true.
If your rule is based on several complex conditions, they can be connected with the help of Grouping. Grouping feature allows you to create groups of conditions within the current expression (Add Group under in a condition box) or add a new group of conditions (Add Group in the condition box). Grouping is a visible alternative to parenthesis in Advanced mode rules structure.
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 under the list of saved expressions.
To switch to the Advance mode please click on the Advanced on the top left of the constructor. Using this mode you can compose rules by typing them manually.
To compose a logic expression that checks up if particular questions and answers have been selected use Question Identifiers or follow this format:
- QX checks up if any answer has been selected in question X.
- QX.AY checks up if answer Y has been selected in question X.
- QX.AY.CZ checks up if answer Y has been rated in column Z in question X. (question type: 'Rate Different Items Along the Scale of Your Choice').
- QX.CZ checks up if any answer has been selected in column Z in question X. (question type: 'Rate Different Items Along the Scale of Your Choice').
- Surveys with enhanced offline support (Linear forms) require routing based on pages, not questions. Advanced logic in such forms is called Branching and can be set up on the Advanced Features page.
- Keep in mind that the questions where you have applied 'Advanced logic' must come before the questions selected to follow them.
- Logic should be the last thing applied to a question. If you modify the question in any way, make sure that your logic rules work properly.
- Autocomplete function allows you faster and easier enter logic expressions. After entering Q, Qx.A orQx.Ay.C system will show you the list of available questions, answer options or answer columns (for 'Rate' and '3D Matrix' questions) accordingly. Picked element will be substituted by its sequence number within the survey.
Combining and Grouping
You can combine logic conditions using AND, OR and NOT operators as well as group them with parentheses ().
Drill down Logic based on Advanced Logic rules
It is possible to create Drill Down logic for your survey using advanced logic rules. Drill Down, is a type of Logic setup which breaks the Form/Survey down into sections of questions according to the pages breakdown. These sections are only accessible to the respondents which are associated with a particular group based on their response. A mandatory requirement in such functionality is adding logic rules to each answer option of Multiple Selection question (of Check All that Apply or List Box type), which should determine where each group of respondents should be directed.
The table below contains the example of form/survey divided into sections. Q1 is the Multiple selection question at the beginning of the form/survey; Q6, Q11, Q17, Q22, Q27, Q32 is the last question in each section at which we should double check if some other section was selected in Q1. The first column contains the rules that specify sections' borders, others contain logic rules for correct redirecting to the appropriate questions at the end of each section.
Q1 | Q6 | Q11 | Q17 | Q22 | Q27 | Q32 |
Q1.A1 -> Q2 | Q1.A2 -> Q7 | Q1.A3 -> Q12 | Q1.A4 -> Q18 | Q1.A5 -> Q23 | Q1.A6 -> Q28 | Q1 -> Q33 |