Question Loop
Question Loop
Question loop nodes allow for the repeated use of the same set of questions or items, suitable for scenarios requiring the collection of multiple similar data points. By utilizing loop control, the manual addition of repetitive questions is reduced, simplifying the questionnaire design process. The system automatically repeats the same or similar questions, decreasing the workload of manual setup and enhancing the efficiency of questionnaire design. Through consistent loop logic, the accuracy and integrity of data collection are ensured. Loop control is a crucial technology for improving the functionality and user experience of online survey questionnaire system software.

Question loop nodes can perform cyclic questioning operations on a set of questions based on the respondents' choices. Before using loop nodes, variable settings must be completed. Subsequently, loop nodes will cycle through a set of questions based on the variable settings. The number of loops is determined by the number of variables that need to be looped. For example, during the questionnaire design process, option B and option C of a question before the loop node are set as variables. If respondents choose option B and option C when answering the questionnaire, they will need to complete loop questions conditioned on variable B and loop questions conditioned on variable C.
Loop Settings
On the canvas, besides the input and output ports, the loop node also has a loop start and a loop end at the bottom.
- The loop start is an output port that can output to another node.
- The loop end is an input port that can receive outputs from other nodes.
The specific usage method is to connect the output of the loop start to some questions, and then connect the final output of these questions as input to the loop end, thus forming a loop. The nodes between the loop start and loop end are referred to as loop body nodes.
When using the loop node, it should be noted that the nodes participating in the loop cannot be interconnected with nodes outside the loop. In other words, the question nodes used in the loop node cannot be connected to nodes other than those within the loop start and loop end.
-
External Loop Variables Select the loop node, open the editing panel, and add external loop variables. External loop variables refer to the variable content that needs to be looped within the loop node.
-
Question Nodes in the Loop These refer to all question nodes participating in the loop. Loop body nodes can all use external loop variables. Each time the questions in the loop body nodes are repeated, the corresponding content to be displayed cyclically is used, achieving the effect of displaying different content through variables.
The loop node currently supports up to 2 levels of nesting.
Random Variable Order
The order in which loop variables are used can be shuffled, following the same rules as random option selection.
How to Use the Loop Node
- First, set the variables that need to be fed into the loop. These variables must be options from nodes preceding the loop node.
- Next, create the questions that need to be looped, embedding the set variables in the questions according to the variable setting rules.
- After completing the above steps, connect the input port of the first question in the loop to the loop start of the loop node, and connect the output port of the last question in the loop to the loop end of the loop node, forming a closed loop.
Case Study 1
Demand Description:
- Multiple-choice question M1 lists four types of fruits: apples, bananas, watermelons, and oranges. Respondents can select multiple fruits they like.
- For each fruit selected by the respondent in M1, multiple-choice question Q asks them about which aspects of the fruit they like, with options including taste, appearance, and freshness.
- Since M1 is a multiple-choice question, respondents may select 1 to 4 fruits in M1. We must inquire separately about the taste, appearance, and freshness of each fruit, so we need to use a loop node and set multiple-choice question Q as a loop body node.
- Add external loop variables in the loop node, selecting M1/Selected Options/Option Text, which represents introducing all options selected by the respondent in M1.
- In the question content of Q, input "@" to open the variable panel and select Loop/Loop Text in the panel, which represents inserting the text obtained from the loop at the specified position, i.e., the options selected by the respondent in M1.
During the actual questionnaire run, if the respondent selects apples and watermelons as their favorite fruits in M1, the loop body node will be inquired a total of 2 times, asking the respondent about which aspects of apples and watermelons they like, respectively.
Case Study 2
Demand Description:
- Based on Case Study 1, add another question. After the respondent selects fruits and the aspects they like about the selected fruits, inquire individually whether the respondent would purchase more fruits solely because of a certain advantage of the fruit, without considering other factors.
- We need to add a second layer of loop to the current loop, connecting the output of the first layer loop to the second layer loop. Add external loop variables to the second loop node, selecting Q/Selected Options/Option Text, which represents introducing all options selected by the respondent in the previous loop.
- Connect multiple-choice question Q_1 to the second layer loop. In the question content of Q_1, input "@" to open the variable panel and select Loop_1/Loop Text in the panel, which represents inserting the text obtained from Loop_1 at the specified position.
- In another position in the question content of Q_1, input "@" to open the variable panel and select Loop/Loop Text in the panel, which represents inserting the text obtained from the loop at the specified position.
- It should be noted that the text obtained from the loop represents all fruits selected by the respondent, while the text obtained from Loop_1 represents all preferences of the respondent for the selected fruits. These two pieces of content together form the required question content.
Loop-related Variables
Insert the tag "@" in the question content participating in the loop, and the system will automatically pop up a list of variables. The main loop-related variables include:
- Loop Text: References the text in the loop variable, which is the most commonly used method.
- Loop Image: References the image in the loop variable.
- Loop Index: The loop presents the same question multiple times, and the index value increments each time. The loop index value indicates the current number of loops.
- Loop Value: References the score in the loop variable.
- Loop Number: References the option number in the loop variable.
- Loop Label: References the remark text in the loop variable.