How to Create Question Rules for a Survey

1.    Access the Knowledge module.

2.    In the Knowledge menu, click the Surveys option.

3.    Click Edit next to the survey for which you want to create question rules.

4.    Click the Question Rules tab to determine which questions will be visible or hidden depending on answers to other questions.

5.    To create rules while viewing the questions the rules apply to, select Rules by Question (see figure below).

 

 

6.    Select the question for which you want to write a rule in the Questions section, which will show as highlighted in yellow.

7.    Click Add Simple Rule (see figure below).

 

 

The system displays a pop-up window where the conditions and actions for the rule can be specified (see figure below).

 

 

8.    In the If (conditions) section, enter the conditions that should be evaluated as true or false.

9.    Click Validate to validate the condition before proceeding.

 

Note 1: The OR, AND, and NOT operators as well as the EqualsTo, Contains, MoreCompliantThan, and ALWAYS methods are case-sensitive.

 

Note 2: The system will only validate the syntax of the rule, not the logic. It’s important to check that the rules are consistent with the questions, and that if any changes are made to the questions the rules are also updated. Keep in mind that only List of Options questions have values associated with the response options that can be used in the EqualsTo and Contains methods.

 

The system displays a success message if the conditions are valid.

 

10. In the Then (action) section, select the property that will be modified if the condition is evaluated to be true from the Property field. The options include the visibility of the question and whether fields for attachments and comments will be required.

11. Select the modification to be made to the property selected if the condition is evaluated to be true by clicking the Value field.

12. In the Order of Execution field, set the order in which the rule will be executed if the condition is evaluated to be true. Specifying an order in which the system will apply the rules prevents them from conflicting with each other.

13. When finished, click Save. If you want to quit the operation, click Cancel.

 

Note: The system supports up to 300 rules per survey without suffering any performance loss. This number includes all rules – control, object, or question, depending on the survey – created for a single survey. If the limit is not respected, the system performance will be compromised when managing surveys in the Knowledge module, but will not be affected when answering the interviews generated from these surveys.

 

The system displays a success message confirming that the rule was saved. The rule that was created is listed in the Actions section (see figure below), and the question that influences the question for which the rule was written appears in the Related Questions section.

Note that, in general, the options selected in the Questions section for the survey have precedence over question rules, which means that if a field for attachments is selected as required while the question is being written, and later a question rule that does not require attachments for this question is created, the question rule will be ignored and an attachment will still be required, for example.

 

 

Note: In this example, question 4 depends on the answer provided to question 6, which, in turn, influences question 4. This type of relationship is specified in the Relationship column. If question 6 is selected, it will show question 4 in the Related Questions section since there was a rule written for it (see figure below).

 

 

14. To delete a rule, click Delete next to it (see figure below).

 

 

15. To create a rule that generates actions for more than one question, click Add Rule (see figure below).

 

 

The system displays a pop-up window where you can create the condition and determine which actions will take place in which questions if the conditions are true (see figure below).

 

 

16. In the Rule Name field, enter a name for the rule that will help you identify it.

17. In the If (conditions) section, enter the conditions that should be evaluated as true or false.

18. Click Validate to validate the conditions before proceeding.

 

The system displays a success message if the conditions are valid.

 

19. In the Then (actions) section, click Add to add an action that will be executed if the conditions are true (see figure below).

 

 

20. In the Question field, select the question for which the action will be executed if the conditions are evaluated to be true.

21. Select the property that will be modified if the conditions are evaluated to be true from the Property field. The options include the visibility of the question and whether fields for attachments and comments will be required.

22. Select True or False in the Value field to determine whether the question will be hidden or whether attachments/comments will be required.

23. When finished, click Save. If you want to quit the operation, click Cancel (see figure below).

                                                           

 

24. In the Order of Execution field, set the order in which the rule will be executed if the condition is evaluated to be true. Specifying an order in which the system will apply the rules prevents them from conflicting with each other. Note that the actions specified for this rule will be executed in the order in which they were created to prevent the actions from conflicting with each other.

25. When finished, click Add Rule. If you want to quit the operation, click Cancel.

 

The system displays a success message confirming that the rule was saved. The rule created is listed in the Actions section, and the questions that influence or are affected by the question for which the rule was written appear in the Related Questions section.

 

Note: You can also manage rules by clicking the Rules option (see figure below). All the rules previously created will be visible here, where you can edit or delete them. New rules can be created here, but you will have to return to the Rules by Question section if you want to see which rules were created for which questions and which questions are related.