Skip to main content

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.

Terminology: Master and Conditional question

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:

  1. Master question: It refers to the parent question which controls the visibility of other question

  2. Conditional question: It refers to the question which is based on response of the parent question

Example:

Question1: Master Question

image-20250208-185320.png

Question 2: Conditional question

image-20250208-185417.png

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

image-20250208-185748.png

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

image-20250208-185840.png
To which questions can conditions/logic be applied?

As stated in the ‘Introduction’ section, we have two important terminologies regarding configuring logic:

  1. 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

  1. 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

Terminology: Condition and Condition Type
  1. 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:

image-20250208-211506.png
  1. 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:

image-20250208-205614.png
Condition type.PNG

In this case: The Condition is ‘visible if’ and the Condition type is ‘Equals’

One question can be dependent on how many Master questions?

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.

image-20250208-194032.png
Eco.PNG

Where to configure conditions/logic?

We have disabled the ‘Logic’ tab inside our questionnaire editor tab.

Logic.PNG

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

Conditions.PNG

Step 2: Configure the logic in the dialog that pops-up and click on 'Apply'

image-20250208-201429.png

Step 3: The logic is added to the question

image-20250208-190733.png

How to configure condition types for different questions:

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.

Condition type.PNG
How to configure condition type for: Yes/No (Boolean)

Allowed condition types if the master question is Yes/No (Boolean): Equals, Not empty

  1. 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.

image-20250208-201429.png
image-20250208-190733.png
  1. 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.

image-20250208-220343.png
image-20250208-220239.png

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.

Boolean.PNG
How to configure condition type for: Radio button group or Dropdown

Allowed condition types if the master question is Radio button group or Dropdown: Equals, Any of, Not empty

  1. 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.

image-20250208-222744.png
image-20250208-222836.png
  1. 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.

image-20250208-224144.png
image-20250208-224031.png
  1. 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.

image-20250208-225019.png
image-20250208-224844.png
How to configure condition type: Checkbox

Allowed condition types if the master question is Checkbox: Any of, All of, Not empty

  1. 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.

image-20250209-103143.png
image-20250208-224031.png
  1. 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.

image-20250209-103711.png
image-20250209-103625.png
  1. 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.

image-20250209-102249.png
image-20250208-224844.png
  1. 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.

Cases we support:

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:

image-20250209-111226.png

image-20250209-111312.png

image-20250209-111403.png

image-20250209-111453.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.