As you design your survey, you can add conditions. Conditions control which questions, pages and choices a respondent sees. They help you ask only what matters and improve the quality of your data.
mWater checks conditions as the respondent answers. You can base a condition on a question on the same page, as long as that question comes before the one you add the condition to.
You can also use conditions on pages. A page is shown or skipped based on an answer on an earlier page.
Conditions let you include or exclude questions based on the answers a respondent gave earlier. This is also called skip logic or branching.
It works like this: show this question only if the condition is met.
In the design view, a question with a condition shows its rule in italics above it (left). In the survey, the question only appears once the condition is met (right).
Logic Types
Conditions can be added to questions, pages and choices. Each type works slightly differently:
Question logic is checked as the respondent answers. You can base it on an earlier question on the same page.
Page logic is checked when the next page loads. The page is shown or skipped based on an answer on an earlier page.
Choice logic shows or hides a single choice in a choice list. See Choice Conditions below.
Question Logic
Page Logic
Question Logic
Page Logic
Condition Settings
Setting up a condition
The condition builder changes based on the question you pick. The operators you see depend on the question type. For a choice question you can use:
was answered
was not answered
is
isn't
is one of
isn't one of
Number questions also offer operators such as is equal to, is greater than and is less than. Checkbox questions use is checked.
Question Logic
Only show a question based on the answer to an earlier question
In the example below, we ask if the water point has a water management committee. We only want to ask "What is your role on the water committee?" if the box is checked.
Before the box is checked, the role question is hidden (left). Once it is checked, the role question appears (right).
Set up the condition
Add the condition to the question you want to show or hide (the target question).
Hover over the target question and click Edit.
Scroll down to Conditions and click + Add Condition.
Use the drop-downs to build the rule.
a. First, select the question that the rule depends on. It can be on the current page or an earlier page. For a matrix question, choose the row to use. b. Next, select the operator. The list only shows operators that fit the question type. c. Finally, select or enter the value to compare against. For "is one of", you can pick more than one choice.
Click + Add Condition again to add more rules. The question only shows if all the rules are true. Click Save when you are done.
The rule below reads as: "Show this question if the committee box is checked and the main drinking water source is Borehole / tubewell."
Page Logic
Only show a page based on an answer on an earlier page
If your survey has more than one page, you can show or skip a whole page. For example, if a respondent does not give consent on the first page, you can skip the pages that follow.
Set up the condition
Setting up page logic works the same way as question logic.
Hover over the page heading and click Edit.
In the Edit Page window, a page is set to Always show by default. Click + Add Condition.
Use the drop-downs to build the rule, then click Save.
a. First, select a question from an earlier page. For a matrix question, choose the row to use. b. Next, select the operator. The list only shows operators that fit the question type. c. Finally, select or enter the value to compare against.
In the example above, the Water page only shows if the location of the household was answered.
Advanced Conditions
Use an advanced condition when simple rules are not enough. For example, when you need or logic, or a rule based on a formula.
In the Conditions area, click + Add Advanced Condition.
In the Select Field, Formula or Value window, pick a question. Or open the Formula tab to build a formula.
Click the blue text to set the operator and values.
Hover over the condition and click + Or to add another rule. The condition is met if any of these rules is true.
Simple and advanced conditions work together. The question only shows if all of them are true. In the example below, the question shows if the committee box is checked and the water source is surface water or a protected spring.
Choice Conditions
You can also show or hide a single choice in a choice question. This keeps the list short and relevant.
Open the question's Edit window.
Under the choice, click + Add conditions.
Under Display only if, click + Add Condition and build the rule.
To remove the rule, click Remove conditions.
Visualize Conditions
Use Visualize Conditions to check the logic of the whole survey in one place. In the Design tab, open the Tools menu and click Visualize Conditions.
Click any page or question on the left. The right side shows:
Direct Conditions: the rules on that item.
Depends On (Inputs): the questions its rules use.
Used By (Outputs): the items whose rules use it.
Best Practices
Test your conditions
After you add a condition, save it and test your survey. Use Preview and the Interactive Preview to check that each path works. Make sure one condition works before you add more.
Best practice tips
Always move respondents forward. Base a condition on a question that comes before the one it controls.
Keep rules simple. Use simple conditions first and advanced conditions only when needed.
Avoid negative logic, such as isn't or isn't one of. It is harder to read and to set up correctly.
Use Visualize Conditions to see which questions depend on each other before you move or delete them.
Check the hint above each question in the design view. It shows the rule in plain words.