Skip to main content

Condition operators

This page lists the operators a Condition Block offers for each field type. You need it when you build a condition and want to know which operators a field offers.

The example is the Blog post template, previewing AI 101, where a Condition Block tests the Related posts field.

Operators by field type​

Studio can test text, number, date, boolean, single select, multiple select and list fields, assets, references and modular blocks. It disables fields of other types, such as a group like SEO.

Field typePart you select firstOperators
TextNoneEquals, Not Equals, Contains, Starts with, Ends with, Matches, Is empty, Is not empty, Exists, Does not exist
Number or dateNoneEquals, Not Equals, Greater Than, Greater Than or Equal, Less Than, Less Than or Equal, Exists, Does not exist, Is empty, Is not empty
BooleanNoneEquals (value True or False), Exists, Does not exist, Is empty, Is not empty
Single selectNoneEquals and Not Equals (value is one of the field's options), Exists, Does not exist, Is empty, Is not empty
Multiple selectSelection, Length or PresenceSelection offers Includes and Excludes
AssetExtension, Size or PresenceExtension offers Equals and Not Equals. Size offers the six comparison operators, with a number.
ReferenceContent Type, Length or PresenceContent Type offers Equals, and you select one of the field's content types
Modular blocksBlock Name, Length or PresenceBlock Name offers Equals, and you select one of the blocks
List field, such as a list of textLength or PresenceLength and Presence, listed in the next table

Operators for Length and Presence​

Length and Presence offer the same operators on every field that asks for them.

PartOperatorsValue
LengthEquals, Not Equals, Greater Than, Greater Than or Equal, Less Than, Less Than or EqualA number
PresenceExists, Does not exist, Is empty, Is not emptyNone

Rules for Is empty, Exists and Matches​

  • Is empty, Is not empty, Exists and Does not exist take no value.
  • To check that a field has a value, use Is not empty. Exists is true for any field the entry has, even one with an empty value.
  • Is empty is true for an empty string, a missing field, an empty list and an empty object. A value of 0 or false is not empty.
  • Text comparisons ignore letter case, except Matches. Matches reads the value as a regular expression.

Where to go next​

Report a problem with this page