Conditional Logic: Operators and Actions
Available on the Advanced and Enterprise tiers:
Contents
About
Conditional Logic uses two core parts—Conditions and Actions—to control the workflow in a form. Conditions use operators to test if answers match a certain rule, and actions define what happens when those conditions are met.
Below are definitions of all available operators and actions, as well as information regarding what kinds of questions they are compatible with.
Operators
Conditional operators define how you compare an answer to another answer, a text string (constant), or a pattern defined by a regular expression (Enterprise tier only).
Operator | Definition |
Equals (=) | Checks if the answer is an exact match (case insensitive) to another value of a comparable data type. |
Does Not Equal (!=) | Checks if the answer is NOT an exact match (case insensitive) to another value of a comparable data type. |
Less Than (<) | Checks if the answer is lower than another value of a comparable data type. |
Less Than or Equal To (<=) | Checks if the question is lower than or an exact match of another value of a comparable data type. |
Greater Than (>) | Checks if the answer is higher than another value of a comparable data type. |
Greater Than or Equal To (>=) | Checks if the question is higher than or an exact match of another value of a comparable data type. |
Between | Checks if the question falls between (but is not equal to) two other values of a comparable data type. |
Contains | Checks if the answer contains another value of a comparable data type.
If you are comparing a multiselect question, it checks if one of the multiselect answers is an exact match to another value. |
Is Answered | Checks if the question has an answer. It is considered to have an answer if ANY value is present; whether it is a default value, a pushed value, or a user-entered value. |
Is Not Answered | Checks if the question does NOT have an answer. |
Multi-Language add-on | |
Is | Checks if the selected form language The selected form language is the language chosen when a user, dispatch, or App‑to‑App call opens a Multi-Language Form. matches any language in the condition. |
Is not | Checks if the selected form language The selected form language is the language chosen when a user, dispatch, or App‑to‑App call opens a Multi-Language Form. does not match any language in the condition. |
Enterprise tier only | |
Matches (regex) | Checks if the answer contains a string that matches a pattern defined by a regular expression. |
Does Not Match (regex) | Checks if the answer does not contain a string that matches a pattern defined by a regular expression |
Operators: Compatibility with Questions and Data Types
General Rules:
- The reference question must be a data type compatible with the operator (see tables below).
- If comparing to another question, that question's data type must also be compatible with the operator. For example, you can’t say “If (integer) = (date/time question)”.
- If comparing to a hard-coded value, it must be of a data type compatible with the operator. For example, you can’t say “If (email question) = 5”.
The form builder prevents you from saving a form with these mistakes.
Compatibility by Operator
Name |
Compatible Data Types |
Incompatible Data Types |
||||
Equals
Does Not Equal |
*Except Multiselect questions |
|
||||
Less Than Greater Than Less Than or Equal To Greater Than or Equal To Between |
*Except Multiselect questions |
Question Type: Multiselect |
||||
Between |
*Except Multiselect questions |
Question Type: Multiselect |
||||
Contains |
|
|
||||
Is Answered Is Not Answered |
Compatibility is by question type:
|
Compatibility is by question type:
|
||||
Enterprise tier only | ||||||
Matches (regex) Does Not Match (regex) |
You can use a regular expression to match answers that are captured as strings. This includes questions that have both display and data values—you can match on the data value.
|
The following question types are not compatible with regex matching:
|
Actions
Actions dictate what happens when a statement is true. Actions can hide a page, make a question required or not required, for example. Essentially, actions change the user's path through the form.
Available Actions
Action |
Applies to |
Definition |
Is Ignored | Pages, Sections |
This setting makes the form act as if the page/section and its data do not exist. The page/section and its data will not be visible and will not be referenced elsewhere. Data on Ignored pages/sections:
Any Required questions on ignored pages/sections will not be enforced. |
Is Not Ignored | Pages, Sections |
Shows the page/section in the mobile form. If the page/section had answers in it, was set to ignored, and is subsequently "not ignored" again, the data will still be there, unless the questions have also been cleared or reset. |
Is Visible | Questions | Shows the question in the mobile form. |
Is Not Visible | Questions |
Hides the question in the mobile form. If it is "Required", it won’t be enforced. If it has an answer, it will not be cleared unless another action does this. Any answer it has can affect the rest of the form and will be submitted. |
Is Required | Questions | Mobile users will be forced to answer the question before submitting the form (unless on an ignored page/section). |
Is Not Required | Questions | Mobile users will not be forced to answer the question. |
Is Read-Only | Questions | Mobile users will not be able to manually alter the answer. |
Is Not Read-Only | Questions | Mobile users will be able to manually alter the answer. |
Is Set to | Questions |
Sets a specified answer for a question further ahead in the form. Note:We recommend that you avoid dispatching into fields that are “set to” a value using Conditional Logic actions. Dispatching a value can produce unexpected results. |
Is Cleared | Questions | Erases an answer to a question (will erase default values). |
Is Reset |
Questions |
Resets a question to its default settings (returns it to its default value). |
Actions: Compatibility
Rules for Actions
- Actions must be valid for the question/item that is being acted on (see below).
- Actions must be performed on pages/sections/questions that occur after ALL the inputs (i.e., sequential).
Compatibility by Operator
Name |
Compatible Question Types | Incompatible Question Types |
Is Visible Is Not Visible |
All |
None |
Is Required Is Not Required |
|
|
Is Read-Only Is Not Read-Only |
|
|
Is Set To |
|
|
Is Cleared |
|
|
Is Reset |
|
|