Logic Control
Logic Control
Logic control is one of the key technologies for enhancing the functionality and user experience of online survey questionnaire systems. Users can utilize logic nodes to evaluate logical conditions, thereby dynamically adjusting the questionnaire flow based on respondents' answers and controlling the direction of the questionnaire. This ensures that each respondent only answers questions relevant to them. By skipping irrelevant questions, it reduces respondents' answering time and improves the completion rate of the questionnaire. It also ensures that the collected data is more accurate and useful, avoiding interference from irrelevant data in the analysis results. Additionally, it provides respondents with a personalized questionnaire experience, enhancing their engagement and satisfaction.

From previous documentation, we know that options in single-choice questions can be connected to achieve questionnaire question jumping. However, when it comes to multiple-choice questions, where multiple answers can be selected simultaneously, this cannot be resolved through connections. Similarly, for question jumping settings in scenarios such as fill-in-the-blank questions, rating questions, and others, logical nodes are required to combine and evaluate the results of questions, determining the subsequent questionnaire flow.
Basic Rules
Logical nodes have two output ports on the canvas:
- Y Output Port: The logical operation result is "true";
- N Output Port: The logical operation result is "false";
Logical nodes can be set with many logical conditions, but the final logical condition will yield an operation result of either "true" or "false".
When combining and evaluating multiple logical conditions, different logical types will affect the combined evaluation result. There are two types of logical types:
- AND: The overall result is true only if all conditions are true simultaneously;
- OR: The overall result is true if any one of the conditions is true;
Based on the set logical type, multiple logical conditions are evaluated, ultimately yielding a result of true or false.
- If the final result is true: The questionnaire will proceed to the next question via the Y output port;
- If the final result is false: The questionnaire will proceed to the next question via the N output port;
Case Study 1
In the questionnaire snippet above, we investigate people's attitudes towards life. The first multiple-choice question asks whether they are hopeful about the future. The second question is a rating scale where respondents rate the frequency of three symptoms, with lower scores indicating lower frequency. Finally, a logical node is used to integrate and evaluate previous responses to draw a conclusion.
Looking at the property editing toolbar on the right, it contains four conditions:
- First question: "Yes" is selected;
- Second question: Anxiety score is less than or equal to 4;
- Second question: Insomnia score is less than or equal to 4;
- Second question: Emptiness score is less than or equal to 4;
The logical operation used is AND:
- When all the above conditions are met, the final operation result of this logical node is true, and it jumps to the end page displaying "You are optimistic" via the Y output port;
- Otherwise, it is false, and it jumps to the end page displaying "I hope you become more optimistic" via the N output port;
Case Study 2
Based on the previous questionnaire, we modify the logical evaluation conditions by changing AND to OR, so that satisfying any one condition is sufficient. After the modification, if any one of the four conditions is met, it will jump to the end page displaying "You are optimistic" via the Y output port. Otherwise, it will jump to the end page displaying "I hope you become more optimistic" via the N output port.
Case Study 3
In the logical conditions of the previous questionnaire, we can see that even if the answer to the question "Are you hopeful about the future?" is "No", as long as any one of the scores in the second question is less than or equal to 4, it will still jump to the end page displaying "You are optimistic".
We make some modifications to achieve the following: only when "Yes" is selected for the first question and all scores in the second question are less than or equal to 4, will it jump to the end page displaying "You are optimistic". Otherwise, it will jump to the end page displaying "I hope you become more optimistic". To achieve this, two logical judgment nodes are needed.
Summary
Conditions within a logical node can be related as "AND" or "OR". Conditions between different logical nodes are related as "AND".