Flow Control

In Ethica, a survey consists of one or more sections which are displayed in sequence to the participant. By default, these sections are shown one after another up to the last section, and then the survey activity session is completed. There are multiple ways to modify this flow based on participants' responses:

  1. When a given answer to a Single Answer or Multiple Answer question is selected, it can override the default flow of the survey.
  2. Each section or question can have a criteria which has to be met before it's shown to the participant.
  3. A section may be set to be a loop section. In that case, it will iterate based on the response to another question.
  4. A given question can be shown or hidden based on the response to another question within the same section.
  5. A survey may have Section Randomization enabled. Also, a section may enable Question Randomization.

Below we explain each of these approaches in more detail.

Changing the Next Section

If a given survey section contains any Single Answer or Multiple Answer question, each of their potential answers can optionally change the next section. For example, assume you are working on a survey on smoking, and you have three sections of questions as follow:

section 1:
    At the present time, do you smoke cigarettes?
        - Yes
        - No

section 2:
    On the days that you smoke, how many cigarettes do you usually smoke?

section 3:
    In the past 30 days, did you use chewing tobacco?
        - Yes
        - No

The default behaviour is that the participant is first presented with Section 1, followed by Section 2 and Section 3. But if they select No in Section 1, this will change the next section from Section 2 to Section 3. Hence pressing Next will take them to Section 3. Note that in this example, all three questions could be placed in one section and then question criteria could be used to show or hide each question. But we placed each in a different section to demonestrate the Next Section functionality.

Any potential answer to a Single Answer or Multiple Answer question can optionally define the index of the section which should be shown following the current section.

Note that if in a Multiple Answer question, multiple answers define different indexes for the next section, the last option selected by the participant will override the previous options. This leads to a nondeterministic behavior and is not suggested. You need to make sure in a Multiple Answer question, if answers are expected to change the index of the next section, they all point to the same section.

Section and Question Criteria

Criteria allow you to define a condition to determine when a survey section or question should be shown, and when it should be skipped, based on the participant's previous responses.

If a criteria is added to a survey section or question, Ethica evaluates the criteria immediately before showing that survey section or question. Depending on the responses provided by participants up to that point, the criteria is either evaluated to True or False. This evaluation result determines whether the survey section or question should be shown or not. If True, Ethica presents the survey section or question. Otherwise, if the criteria is evaluated to False, Ethica navigates to the next section or the question following it. If the section or the question with the criteria is the last section, and the criteria is evaluated to False, Ethica will finish the survey.

Loop Sections

You can configure a given section to be a loop section, and associate it with a question in another section. In this case, Ethica will iterate through the loop section zero or more times, based on the response to the referenced question.

As an example, consider the following survey:

section 1:
    Q1-Number: How many siblings do you have:

section 2:
    Q2-Single Answer: What is the gender of your {{loop_value}} sibling?
        Male
        Female
        Other
    Q3-Number: How old is your {{loop_value}} sibling?

Here, you can set section 2 as a loop section and set the reference question to the Question ID 1. In this case, Ethica will ask the questions in section 2 as many times as the number of siblings the participant has. For example, the following shows the questions the participant will be asked if they report they have 2 siblings:

section 1:
    Q1-Number: How many siblings do you have:
        2

section 2 - Iteration 1:
    Q2-Single Answer: What is the gender of your 1st sibling?
        Female
    Q3-Number: How old is your 1st sibling?
        35

section 2 - Iteration 2:
    Q2-Single Answer: What is the gender of your 2nd sibling?
        Female
    Q3-Number: How old is your 2nd sibling?
        30

Notice that the {{loop_value}} is a placeholder that is replaced by the proper value based on the current iteration and the response to the reference question.

Reference questions must be either a number question or a Multiple Answer question. If the reference question is a number question, the loop section will iterate as many times as the number the participant has chosen. If the participant enters 0, the loop section will be skipped completely. If the reference question is a Multiple Answer question, the loop section will iterate once for each selected answer. In this case, the {{loop_value}} in each iteration will be the text of the chosen answer.

Note that the reference question should be in the same survey as the loop section, and it should appear in one of the sections prior to the loop section. This is to ensure the question is responded before the loop section is expected to be displayed.

Also, Ethica does not support multiple consecutive loop sections. Each loop section must be followed by a normal survey section.

Enabling/Disabling Questions

Ethica allows you to show and hide the questions within a given section, based on the response provided for another question. Any potential answer for a Single Answer or Multiple Answer question has a property called Enable question, which receives a list of comma-separated question IDs to be enabled if the participant selects this answer. All questions being enabled are expected to be on the same section as the Single Answer or Multiple Answer question containing the potential answer.

For example, assume you want to know if participants have experienced coughing during the last week and if yes, do they think that was due to low air quality. You can create a survey as follow:

section 1:
    Q1: Did you experience coughing or wheezing last week?
        - Yes
            [Enable questions: 2]
        - No
    Q2: Do you believe that it is likely that these symptoms were related to poor air quality?
            [Disabled: True]
        - Yes
        - No

You can set Q2 to be disabled by default, therefore it will be hidden and the participant cannot see it. If the participant chooses Yes as the response to the Q1, Ethica will enable Q2 and show it to the participant.

Section and Question Randomization

We discuss Section Randomization elsewhere. Similarly, you can randomize the selection of the questions within each section using the Question Randomization options. To randomly select a subset of questions within your section, use the Included Question ID(s) and Selection Count options. Using this, besides the questions that are not part of the Included Question ID(s), only a subset of the specified questions will be used to construct the section, where the size of the subset is the same as the Selection Count.

For example, assume your survey section has 7 questions, with IDs from 1 to 7. Also assume the Included Question ID(s) refers to question IDs 3, 4, and 5, and the Selection Count is set to 2. With these settings, questions 1, 2, 6, and 7 will always be in the section, and from questions 3, 4, and 5, only two randomly selected questions will be used to construct the section.

You also can enable the Random Question Order option to randomize the order in which these questions are displayed.

Please note that these randomizations happen only once for each survey session whenever the corresponding survey is opened.