Logical OR using an "includes" operator in conditional logic rules
When a step is gated on a list question, you often want it to appear for more than one answer. A shipping step that applies to Express and to Overnight, but not to Standard. Writing one rule per answer works, but it means keeping several rules in step with each other forever.
The includes comparison does it in a single rule: the step is shown when the answer is any one of the values you tick.
Where includes is offered
It appears in the must be dropdown when the controlling field is a Choose from list or a Choose from Data Table field, alongside equal to and does not equal. Fields that take free text, numbers or dates do not offer it, because there is no fixed set of answers to pick from.
Set up the rule
- Open the workflow for editing.
- Hover over the step you want to control and click the conditional logic icon (the crossed arrows).
- Choose the step whose answer should control it, and the data field if that step collects more than one.
- Set must be to includes.
- The list of possible answers appears as checkboxes rather than a single dropdown. Tick every answer that should show the step.
- Check the plain-English summary, then click Save Rule.
How it behaves in a run
The step appears as soon as the controlling step is completed with any one of the ticked answers. Untick an answer in the rule and runs started afterwards stop showing the step for it.
If the controlling question allows several answers to be chosen at once, the rule is satisfied when any of the person's answers is one you ticked. See Multi-select data collection list option.
Includes versus several rules
One includes rule and several equal to rules combined with OR produce the same result today. Prefer includes when the answers all come from the same question: it is one thing to edit when the list of answers changes, and the summary reads as one sentence.
Reach for several rules when the conditions come from different questions, for example when a step should appear for an Express order or for any order over a certain value. That is what conditional AND and OR are for. See Using conditional AND and conditional OR to control display of sections and steps.
Keeping the rule and the list in step
The checkboxes are built from the answers defined on the controlling question. If you rename an answer in that question later, the rule no longer matches it, and the step silently stops appearing. After editing the choices on a question, reopen any rule that reads it and confirm the right boxes are still ticked.
Video walkthrough
This video walks through using the includes comparison in a conditional rule.