In this article
Use Condition nodes to create "Skip logic" in your survey, thereby altering the flow of a survey depending on the answers given to other questions. To create and edit a Condition, add it to the survey as you would any other item then click on it.
A condition item consists of three parts; an IF condition, a THEN clause and an optional ELSE clause.
The flow is controlled by a Boolean expression in the IF condition that evaluates to either TRUE or FALSE. If the expression evaluates to TRUE, the survey will execute the routing items in the THEN node. If the expression evaluates to FALSE, when the ELSE node exists the items in the ELSE node are executed. If the ELSE node does not exist then the survey merely continues to the next node.
You can build the condition using the condition builder functionality (go to Building a Condition for more information), or you can script it using JScript or JavaScript. Note that if scripting is used then this will take precedence over logic created using the builder. Also, if scripting is used then it will be included in the condition ID in the survey pane. If scripting is not used then the condition ID will include the question on which the condition is based.
The example - below shows a multilayer conditional item in the survey pane in which scripting is used.
Figure 1 - Example of a Condition node
Note: If you change a condition from IF-THEN-ELSE to IF-THEN, any items remaining in the ELSE branch will be deleted. If you wish to keep these items, move them elsewhere in the survey before you change the condition.
Figure 2 - The Condition node’s details page