Logic and validation

Operators

Every condition you can use in display logic, validation rules and automation conditions, and which fields each one suits.

Operators are the comparisons in a condition, such as Is, Contains or Is more than. The same set is used by conditional logic, validation rules and conditions in automations, such as an If step. The builder only lists the operators that suit the value you picked.

All operators

Validation rules phrase each operator as a requirement, so the label differs slightly from display logic and automations.

Display logic and automationsValidationNeeds a value
IsMust equalYes
Is notMust not equalYes
Is more thanMust be greater thanYes
Is at leastMust be greater or equal toYes
Is less thanMust be less thanYes
Is at mostMust be less or equal toYes
Length isMust have lengthYes
Length is notMust not have lengthYes
Length is more thanMust exceed lengthYes
Length is at leastMust exceed or equal lengthYes
Length is less thanMust be less than lengthYes
Length is at mostMust be less or equal to lengthYes
ContainsMust containYes
Does not containMust not containYes
Starts withMust start withYes
Ends withMust end withYes
Matches patternMust match a pattern (regular expression)Yes
Is an email addressMust be valid emailNo
Is a web addressMust be valid URLNo
Is a numberMust be numberNo
Is a whole numberMust be integerNo
Is a decimal numberMust be decimal numberNo
Is letters onlyMust be alphabeticNo
Is letters and numbersMust be alphanumericNo
Is trueMust be trueNo
Is falseMust be falseNo
Is emptyMust be emptyNo
Is not emptyMust not be emptyNo

In the condition menu they are grouped as Is or is not, More or less, Length, Text, Kind of value, Yes or no and Filled in or not.

When an operator needs a value, you can type one or pick another answer or data table value.

Operators by field

FieldsOperators offered
Text, Long text, Email, URL, Phone, Password, Signature, Hidden value, Dropdown, Single choice, Country, Team member, and the parts of Name and AddressIs, Is not, the length operators, Contains, Does not contain, Starts with, Ends with, Matches pattern, the kind of value checks, Is empty, Is not empty
Number, Slider, RatingIs, Is not, Is more than, Is at least, Is less than, Is at most, Is empty, Is not empty
Yes or noIs, Is not, Is true, Is false, Is empty, Is not empty
Date, Time, Date and timeIs, Is not, Is empty, Is not empty
Multiple choice, File uploadThe length operators, Contains, Does not contain, Is empty, Is not empty
A repeating field or group, as a wholeThe length operators, Is empty, Is not empty

To compare the answers inside a repeating group, pick a field in it rather than the group.

When the type of a value isn’t known in advance, such as the result of an automation step, every operator is listed. Pick one that suits the value you expect.

The condition menu also lists Is more than, Is at least, Is less than and Is at most for date and time fields, but these comparisons don’t work for dates and times yet. To limit which dates or times can be chosen, use the field’s minimum and maximum settings. See Field settings.

How the operators compare

Is and Is not

  • Text comparisons are exact and case-sensitive: “London” is not “london”.
  • Numbers compare by value, so 10 is 10.0.
  • For Dropdown and Single choice, compare with the option’s value, not its label. Country answers are two-letter codes such as GB.

More or less

These compare numbers. Is at least includes the value itself; Is more than doesn’t.

Length

  • For text, the length is the number of characters. “café” has four.
  • For Multiple choice, it is the number of options chosen. For File upload, the number of files.
  • For a repeating field or group, it is the number of items.
  • An empty answer has a length of 0.

Text

  • Contains, Starts with and Ends with are case-sensitive.
  • For Multiple choice, Contains checks whether a particular option was chosen. Use the option’s value.
  • Matches pattern takes a regular expression in RE2 syntax. It can match anywhere in the answer unless you add ^ at the start and $ at the end.

Kind of value

These check what text looks like:

OperatorPasses for
Is an email addressLetters A to Z, digits and . _ % + - before the @, then a domain with a dot and an ending of two or more letters
Is a web addressText starting with http://, https:// or ftp://, with no spaces
Is a numberA whole or decimal number, such as 42 or -3.5, with no spaces or thousands separators
Is a whole numberA number with no decimal point, such as 42
Is a decimal numberA number written with a decimal point, such as 3.5
Is letters onlyOnly the letters A to Z, in either case. Spaces, accents and hyphens fail.
Is letters and numbersOnly the letters A to Z and digits 0 to 9

Is an email address is stricter than the Email field’s own check, which accepts any address like name@example.com.

Yes or no

Is true and Is false check a Yes or no answer.

Filled in or not

Is empty passes for an unanswered question, empty text and a list with nothing in it. A number 0 and a Yes or no answer of no are not empty.

Unanswered questions

When the value being checked has no answer, a condition passes only for:

  • Is empty
  • Is not, when compared with a value
  • the length operators, which treat it as length 0

Everything else, including Does not contain, fails. For example, “Notes Does not contain urgent” doesn’t match until something is written in Notes. Add an Is not empty rule, or use Is empty, when you need to handle unanswered questions explicitly.

In validation, rules don’t run on an optional field left empty. See Validation.

Change operators in automations

Automations started by Answer changes while filling in, Answers are changed or Team field changes have three more operators, grouped under Change:

OperatorPasses when
ChangedThe value is different from before the save
Changed toThe value changed, and is now the value you give
Changed fromThe value changed, and used to be the value you give

See Triggers.

Something missing or unclear? Tell us.