Configuring conditions/logic inside questionnaire:
Conditions/logic inside a questionnaire is used to make a certain question visible or required based on the answer to other question. This allows questionnaire designer to ask more specific questions based on the previous response and display only relevant questions to the respondent.
To understand the logic of configuring conditional questions inside Onventis, it is important to understand the following terminology which will be used in this article:
Master question: It refers to the parent question which controls the visibility of other question
Conditional question: It refers to the question which is based on response of the parent question
Example:
Question1: Master Question

Question 2: Conditional question

In this case, Question 2 is valid only if Question 1 is answered ‘Yes’. You can add this condition inside the questionnaire designer.
Scenario 1: If user selects the answer to Question 1 as ‘Yes’, Question 2 is displayed

Scenario 2: If user selects the answer to Question 1 as ‘No’, Question 2 is not displayed

As stated in the ‘Introduction’ section, we have two important terminologies regarding configuring logic:
Master question: It refers to the parent question which controls the visibility of other question. The master question can only be question types which have predefined options to choose from.
Allowed question types for Master questions:
Single choice questions
Yes/No (Boolean)
Radio button group
Dropdown
Multi choice question:
Checkbox
Conditional question: It refers to the question which is based on response of the parent question. There is no restriction to adding conditions to any question type.
Allowed question types for Conditional questions: All question types except Panel. Instead of applying condition to a panel, you can simply copy and paste the condition to all questions inside that panel.
To understand in detail the different question types that Onventis offers, please refer to this article: https://onventis.atlassian.net/wiki/x/FoDWW
Condition: Condition refer to the type of logic or characteristic that needs to be configured such as making a question visible or required.
List of allowed conditions:
Visible if: It is the most common type of condition used while designing questionnaire. It is used to make a question visible based on the response of another question.
Required if: It is used to make a question mandatory to be answered by the respondent based on the response of another question. Generally, it is used together with 'visible if'
Example:

Condition Type: Condition type refers to the scenario in which that particular condition will be applied. E.g. When the response is equal to, or any of the choices etc.
List of allowed Condition type: Equals, Any of, All of, Not empty.
Refer to below example:

In this case: The Condition is ‘visible if’ and the Condition type is ‘Equals’
In scope of improving our questionnaire scoring model, we have added restriction to the number of master questions that a conditional question can have.
With our changes, one conditional question can be dependent on only one master question. We do not allow and support configuring logic on one question, based on the response of multiple questions. On the other hand, one master question can have several dependent conditional questions.
To enforce this restriction, we have removed the option to use ‘and/or’ operator while configuring logic. Only one condition can be added to each question.
Example of unsupported condition: One question having dependency on two questions, i.e. two master questions.

We have disabled the ‘Logic’ tab inside our questionnaire editor tab.
Conditions can only be added in the ‘Designer’ tab via the following steps:
Step 1: Select the question, click on the side panel and navigate to the ‘Conditions’ tab. Click on the icon as shown below to configure the logic
Step 2: Configure the logic in the dialog that pops-up and click on 'Apply'

Step 3: The logic is added to the question

Condition Type: As stated in the terminology, condition type refers to the scenario in which that particular condition will be applied. E.g. When the response is equal to, or any of the choices etc.
List of allowed Condition type: Equals, Any of, All of, Not empty.
Allowed condition types if the master question is Yes/No (Boolean): Equals, Not empty
Equals: It is used to trigger a condition when a specific option is selected. As shown in the example below, Question 2 is visible only if Question 1 is answered ‘Yes’. If the answer to Question 1 is ‘No’, there is no point in asking the second question.


Not empty: It is used to trigger a condition when either of ‘Yes/No’ is responded. It does not matter which option the supplier selects, as long as the supplier responds to the master question, the conditional question will be displayed.


As mentioned earlier we have disabled adding multiple conditions to a question via ‘and/or’ operator.
We witnessed questionnaires using the logic shown in below example.
Instead of using ‘or’, users should use the ‘Not empty’ condition as shown above.
Allowed condition types if the master question is Radio button group or Dropdown: Equals, Any of, Not empty
Equals: It is used to trigger a condition when a specific option from the set of specified option is selected. As shown in the example below, Question 2 is visible only if Question 1 is answered with Choice 1. If the answer to Question 1 is not ‘Choice 1’, there is no point in asking the second question.


Any of: If a respondent has the options A, B, and C and a question should become visible or required, if either of A or B is selected in such case ‘Any of’ should be used.
As shown in the example below, Question 2 is visible only if Question 1 is answered with Choice 1 Choice 2, or Choice 3. If the answer to Question 1 is ‘No’, there is no point in asking the second question.


Not empty: It is used to trigger a condition when either of option is selected. It does not matter which option the supplier selects, as long as the supplier responds to the master question, the conditional question will be displayed.


Allowed condition types if the master question is Checkbox: Any of, All of, Not empty
Any of: If a respondent has the options A, B, and C and a question should become visible or required, if either of A or B is selected in such case ‘Any of’ should be used.
As shown in the example below, Question 2 is visible only if Question 1 is answered with Choice 1 Choice 2, or Choice 3. If the answer to Question 1 is ‘No’, there is no point in asking the second question.


Any of can also be used as an alternative to Equals for Checkbox questions:
If a checkbox question has several options, and if a specific option is selected another question should become visible, any of condition type can be used. In the below example, Question 2 should become visible only if Scope 1 is selected. Another question with a similar condition for Scope 2 can also be configured. If the supplier selects both Scope 1 and Scope 2, the supplier will see two separate questions to enter the emissions for that scope.


Not empty: It is used to trigger a condition when either of option is selected. It does not matter which option the supplier selects, as long as the supplier responds to the master question, the conditional question will be displayed.


All of: If a question should become visible if all of the options are selected, then condition type ‘All of’ should be used. It is not common to configure this condition type for practical purposes.
As mentioned earlier, with our changes, one conditional question can be dependent on only one master question. We do not allow and support configuring logic on one question, based on the response of multiple questions.
On the other hand, one master question can have several dependent conditional questions.
Example of cases we support:



