Logic conditions

Every condition source and operator for display logic, skip logic and branches

A condition reads one answer or one embedded data field and says yes or no. The same condition editor sets conditions in four places.

WhereWhat it does when its conditions hold
A question's Display logicShows the question. The pane reads “Show this question only if”.
A choice's display logicShows the choice. Open the choice's menu and pick Add display logic.
A Skip logic ruleSkips ahead once the question is done, answered or not.
A Branch in the survey flowRuns what is inside the branch. The flow shows it as “Then branch if”.

Joining conditions

Add condition adds another. Between the first two you choose And or Or, and that word joins every condition in the set. And holds when every condition holds. Or holds when at least one does.

A set with no condition never holds. A branch with none says “This branch won’t run until you add a condition.” A skip rule with none says “This rule won’t apply until you add a condition.” Removing the last condition from display logic turns display logic off.

What a condition can read

The first select is the source:

  • Question: any question that takes an answer. Display logic can't read the question it is on. Pick one that is asked before the logic runs. Logic that reads a later question always sees no answer, and the builder flags it: “This logic reads Q5, which isn’t answered before it, so it always sees no answer.”
  • Embedded data: a field the survey flow sets. It is offered once the flow sets a field. Until then the editor says “Add an embedded data field in Survey flow first.”

The operators after it depend on the question's type.

Multiple choice

Pick a Choice, then an operator. Choices carried forward from an earlier question are listed too.

OperatorHolds when
Is selectedThe answer includes the choice.
Is not selectedThe answer leaves the choice out, or the question has no answer.
Is displayedThe question was shown and the choice was on it.
Is not displayedThe question was not shown, or the choice was hidden from it.

Is displayed matters when choices are shuffled, picked at random or have their own display logic.

Text entry

OperatorHolds when
Is emptyThere is no text. An unanswered question is empty.
Is not emptyThere is text.
Is equal toThe text equals the value, ignoring case.
Is not equal toIt does not.
ContainsThe text contains the value, ignoring case.
Does not containIt does not.

Under Number validation four more appear: Is less than, Is at most, Is greater than and Is at least. They hold only when both the answer and the value read as numbers. Under Number validation, Is equal to also compares numbers, so 9.0 equals 9.

Slider

On a slider with statements, pick the Statement first. Without one, the condition reads the first statement.

OperatorHolds when
Is equal toThe value equals the number.
Is not equal toIt does not, or the slider has no value.
Is less thanThe value is below the number.
Is at mostThe value is the number or below.
Is greater thanThe value is above the number.
Is at leastThe value is the number or above.
Is Not applicableThe participant answered N/A.
Is not Not applicableThey did not.

The last two appear only when the slider has Add “Not applicable” option on. For an N/A answer or an unanswered slider, no number comparison holds except Is not equal to.

Matrix table

Pick the Statement, then an operator.

OperatorHolds when
IsThe statement's answer is the chosen Scale point.
Is notIt is another point, or the statement has no answer.
Recode is equal toThe answer's value equals the number.
Recode is not equal toIt does not, or the statement has no answer or a Not applicable one.
Recode is less thanThe answer's value is below the number.
Recode is at mostIt is the number or below.
Recode is greater thanIt is above the number.
Recode is at leastIt is the number or above.

The recode operators read each point's Value. A Not applicable point has no value, so of the recode operators only Recode is not equal to holds for it.

Embedded data

Pick the field, then an operator. A field the flow has not set is empty.

OperatorHolds when
Is emptyThe field is empty or not set.
Is not emptyIt has a value.
Is equal toThe value matches exactly, case included.
Is not equal toIt does not.
ContainsThe field contains the value, ignoring case.
Does not containIt does not.
Is less thanBoth read as numbers and the field is smaller.
Is at mostBoth read as numbers and the field is smaller or equal.
Is greater thanBoth read as numbers and the field is larger.
Is at leastBoth read as numbers and the field is larger or equal.

Unanswered questions

A question that was skipped, hidden or not reached has no answer. These operators hold for it: Is not selected, Is not equal to, Does not contain, Is empty, Is not Not applicable, Is not and Recode is not equal to. Is not displayed holds for a question that was never shown. Every other number comparison fails for it.

So “show this if Q1 Is not selected Daily” also shows it to someone who never answered Q1. Add a second condition with And when that matters.

Skip logic rules

Skip logic sits on every question that takes an answer. Each rule reads “If” its conditions, then Skip to a target:

  • a later question in the same block,
  • End of block, or
  • End of survey.

Rules are checked in order once the question is done, and the first rule that matches applies. Use the arrows on a rule to move it up or down. Add skip rule adds one. A new rule's first condition reads the question it sits on.

Seeing logic at work

Preview shows Path so far beside the phone. It says when display logic showed or hid a question, with the conditions that decided it, and which skip rule applied and where it went, so you can check a path before you launch. In your export, a question hidden by display logic has an empty cell; see Export file format.