Scripting Trees and Nodes
When you build a script, the system displays the questions and answers in a hierarchical tree structure to help you identify parent, child, and sibling items, or nodes. A node is any line in the tree. There are four types of nodes:
Root nodes
A root node is the first node in a script tree. Root nodes must be followed by a question node. The system automatically creates the root node when you save the script header.
Question nodes
Question nodes are the questions in a script. Question nodes must be followed by one or more answer nodes or any nodes, with one exception:
You do not need to follow a guide information question in a linear script with an any node or an answer node.
For example, if you insert a single select question into a script, you must follow it with one or more answer nodes. Question nodes can follow an answer node or an any node.
Answer nodes
Answer nodes are children of their associated question node. Each answer node represents a valid answer choice for the question. You use answer nodes after single or multiple select questions. You can follow a set of answer nodes with an any node or a question node.
Any nodes
Any nodes are used to direct the script when no answer nodes, or multiple answer nodes, are chosen. Any nodes can follow a question or answer node. Any nodes are children of their associated question node. You must include an any node in these situations:
In branch or linear scripts, an any node must follow a value input question.
You cannot put an answer node after this question type, and you cannot follow a question node with another question node. Therefore, you insert an any node to direct the system to the next question in the script.
In a branch script, an any node must follow a guide information question, unless that question is the last question in the script.
You cannot put an answer node or another question node directly after a guide information question node in a branch script.
In a branch script, if a question has one or more answers with a follow-up (child) question, but not all of the questions have a follow-up question.
The any node directs the system to the next question in the script if the user chooses one of the answers that does not have a follow-up question. For example, you might ask respondents what their favorite color is, and allow them to choose from red, blue, yellow, or green. Your organization has bright red and maroon products. Therefore, if the respondent chooses red, you might ask a follow-up question such as Do you prefer bright red or maroon?
However, if the respondents answered that their favorite color was blue, yellow, or green, and you offer only one type of blue, yellow, or green product, you might not include follow-up questions for those answers. Therefore, in addition to inserting answer nodes for red, yellow, blue, and green, you must insert an any node for this question. The any node directs the system to the next question in the script if an answer with its own path is not chosen. If the respondent chooses red, the system brings the user to the next question under the red path. However, if the respondent chooses yellow, there is no path to follow that is associated with the yellow answer. Therefore, the system uses the any node to direct the user to the next question in the script.
In a branch script, an any node must follow a multiple select question.
If a single answer is selected, the system follows the branch that is associated with that answer node, if one exists. If the answer node does not have its own branch, the system follows the any node. Additionally, if multiple answers are selected, it is possible that each of those questions has a separate branch. Therefore, when multiple answers are selected, the system follows the any node. The any node directs the system to the next valid question in the script. The system disregards the paths of the selected answer nodes if multiple answers are selected, as each path might be different.
When you build scripts, you use the Add Question, Add Answers, Add Any Node, and Delete Node buttons to add nodes to the tree or remove them from the tree. To prevent you from adding nodes in the wrong location, these buttons are enabled and disabled depending on the user's location in the tree. For example, by disabling the Add Question button, the system does not allow you to enter a question node directly after another question node.