You are here:
Flow Operators in Decision, Wait, and Collection Filter Elements
Use condition operators to verify the value of a selected resource. Use conditions in Decision, Wait, and Collection Filter elements.
Required Editions
| View supported editions. |
Use this reference to understand the supported operators, organized by the data type you select for Resource.
Text comparisons in Decision, Wait, and Collection Filter elements are case-insensitive. This applies to Text, Picklist, and Multi-Select Picklist values. The exception is comparisons that contain Salesforce ID values, which are case-sensitive.
$Record Fields in Record-Triggered Flows
Use these operators to evaluate the {!$Record} resource or
fields on the {!$Record} resource in a record-triggered flow. These
operators are available only in Decision elements.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Is Changed | The value of the selected field on Is Changed always evaluates to false when a record is created because there is no prior value to compare against. Is Changed also evaluates to false when the triggering record is created and updated in the same transaction. This behavior occurs because no committed prior state exists when the update occurs. Is Changed is not supported on async or scheduled paths. Additionally, Is Changed doesn't detect changes to rich text field formatting, and can't reference fields on related objects. |
Boolean |
| Was Set | The value of the selected field on Was Set is true whenever the field has a value, regardless of whether it came from the flow, from the record when the flow started, from a user edit, or from automation outside the flow. Was Set is false when the field is null or blank at the time the flow evaluates the condition. |
Boolean |
Apex-Defined
Match the @AuraEnabled attribute’s Apex data type with a flow data type in this reference to determine the supported operators.
| Apex Data Type | Flow Data Type |
|---|---|
| Boolean | Boolean |
| Date | Date |
| DateTime | Date/Time |
| Decimal | Number |
| Double | Number |
| Integer | Number |
| List | Collection |
| Long | Number |
| String | Text |
Boolean
Check whether a Boolean resource’s value matches another value or resource.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Does Not Equal | The value of the selected Resource doesn’t match what you enter or select for Value. | Boolean |
| Equals | The value of the selected Resource matches what you enter or select for Value.
|
Boolean |
| Has Error | Available in Decision elements only when the selected Resource is an Action, Decision, Delete Records, or Update Records element in the flow. Use to determine whether the specified element encountered an error during the flow interview. | Boolean |
| Is Blank | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value similar to Is Null. See Text. | Boolean |
| Is Null | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value. | Boolean |
| Was Set | The value for Resource is a field on a record
variable, and that field has a value during the flow run. Was Set is true whenever the field
has a value. The value comes from the flow, from the record when the flow started, from a
user edit, or from automation outside the flow. Was Set is false only when the field is |
Boolean |
| Was Visited | Available in Decision and Wait elements only when the selected Resource is an Action, Decision, Delete Records, or Update Records element in the flow. Use to determine whether the specified element was visited during the flow interview. | Boolean |
Choice
Every choice resource has a data type and obeys the operator rules for that data type. However, choice resources support one extra operator that other resources don’t, no matter what their data type is.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Was Selected | A user selected that choice, picklist choice set, or record choice set in a screen component. If your flow references the same choice in multiple screens, Was Selected always respects the most recent screen that the flow visited. If your flow references the same choice with a text input in more than one place on the same screen, this operator always respects the first usage in the screen. |
Boolean |
Collection
Check whether a Collection resource’s value contains or matches another value or resource.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Contains | An item in the collection that’s selected for Resource contains the same value as Value. For record collection variables, Contains is true only if the collection includes a record with the same fields and field values as Value. |
Resource of the same data type. For record collection variables, only record resources with the same object type are supported. |
| Does Not Equal | The Resource collection doesn’t match the Value collection. Two record collection variables are unequal if they include different fields or if the fields have different values. |
Collection of the same data type. For record collection variables, only record collection variables with the same object type are supported. |
| Equals | The Resource collection matches the Value collection Two record collection variables are equal if they include the same fields and those fields have the same values. |
Collection of the same data type. For record collection variables, only record collection variables with the same object type are supported. |
| Is Empty | An empty collection | Boolean |
| Is Null | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value. | Boolean |
Currency and Number
Check whether a Currency or Number resource’s value matches, is larger than, or is smaller than another value or resource.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Does Not Equal | The value for Resource doesn’t match what you enter or select for Value. |
|
| Equals | The value for Resource matches what you enter or select for Value. |
|
| Greater Than | The value for Resource is larger than what you enter or select for Value. |
|
| Greater Than or Equal | The value for Resource is larger than what you enter or select for Value or is the same. |
|
| Less Than | The value for Resource is smaller than what you enter or select for Value. |
|
| Less Than or Equal | The value for Resource is smaller than what you enter or select for Value or is the same. |
|
| Is Blank | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value similar to Is Null. See Text. | Boolean |
| Is Null | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value. | Boolean |
| Was Set | The value for Resource is a field on a record
variable, and that field has a value during the flow run. Was Set is true whenever the field
has a value. The value comes from the flow, from the record when the flow started, from a
user edit, or from automation outside the flow. Was Set is false only when the field is |
Boolean |
Date and Date/Time
Check whether a Date resource’s value matches another value, falls on a calendar reference such as today or an anniversary, or falls within a span of days.
{!$Flow.CurrentDate}.| Operator | True If... | Supported Data Types |
|---|---|---|
| Does Not Equal | The value for Resource doesn’t match what you enter or select for Value. |
|
| Equals | The value for Resource matches what you enter or select for Value. |
|
| Greater Than | The value for Resource is a later date or time than what’s entered or selected
for Value. For example, to check whether a date is later than today, set Value to
{!$Flow.CurrentDate}. |
|
| Greater Than or Equal | The value for Resource is a later date or time than what’s entered or selected
for Value or is the same date or time. For example, to check whether a date is today
or later, set Value to {!$Flow.CurrentDate}. |
|
| Less Than | The value for Resource is an earlier date or time than what’s entered or
selected for Value. For example, to check whether a date is earlier than today, set
Value to {!$Flow.CurrentDate}. |
|
| Less Than or Equal | The value for Resource is an earlier date or time than what’s entered or
selected for Value or is the same date or time. For example, to check whether a date
is today or earlier, set Value to {!$Flow.CurrentDate}. |
|
| Is Blank | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value similar to Is Null. See Text. | Boolean |
| Is Null | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value. | Boolean |
| Was Set | The value for Resource is a field on a record
variable, and that field has a value during the flow run. Was Set is true whenever the field
has a value. The value comes from the flow, from the record when the flow started, from a
user edit, or from automation outside the flow. Was Set is false only when the field is |
Boolean |
| Is On | The calendar date of the value for Resource is the same as the date in Value. | Date |
| Is Before | The value for Resource is before the date in Value. | Date |
| Is After | The value for Resource is after the date in Value. | Date |
| Is Anniversary of Today | The month and day of the value for Resource match the current month and day, regardless of year. | Date |
| Is Not Anniversary of Today | The month and day of the value for Resource don’t match the current month and day. | Date |
| Is Today | The calendar date of the value for Resource is today. | Date |
| Is Tomorrow | The calendar date of the value for Resource is tomorrow. | Date |
| Is Yesterday | The calendar date of the value for Resource is yesterday. | Date |
| Greater Than Last Number of Days | The value for Resource satisfies “greater than last number of days” using the number in Value. | Date |
| Last Number of Days | The value for Resource falls within the last number of days specified in Value, including today. If Value is a decimal, the system uses only the whole number. | Date |
| Next Number of Days | The value for Resource falls within the next number of days specified in Value, including today. | Date |
| Last Number of Months | The value for Resource falls within the last number of calendar months specified in Value, excluding the current month. | Date |
| Next Number of Months | The value for Resource falls within the next number of calendar months specified in Value, excluding the current month. | Date |
| Is This Month | The calendar month and year of the value for Resource match the current calendar month. | Date |
| Is Next Month | The calendar month and year of the value for Resource match the calendar month immediately after the current month. | Date |
| Is Last Month | The calendar month and year of the value for Resource match the calendar month immediately before the current month. | Date |
| Last Year | The calendar year of the value for Resource matches the calendar year immediately before the current year. | Date |
| This Year | The calendar year of the value for Resource matches the current calendar year. | Date |
| Next Year | The calendar year of the value for Resource matches the calendar year immediately after the current year. | Date |
| Last Number of Years | The value for Resource falls within the last number of calendar years specified in Value, excluding the current calendar year. | Date |
Picklist
Check whether a Picklist resource’s value matches or contains another value or resource.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Contains | The value for Resource contains what you enter or select for Value. For
example, if the value of |
|
| Does Not Equal | The value for Resource doesn’t match what you enter or select for Value. |
|
| Equals | The value for Resource matches what you enter or select for Value. |
|
| Is Blank | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value similar to Is Null. See Text. | Boolean |
| Is Null | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value. | Boolean |
| Was Set | The value for Resource is a field on a record
variable, and that field has a value during the flow run. Was Set is true whenever the field
has a value. The value comes from the flow, from the record when the flow started, from a
user edit, or from automation outside the flow. Was Set is false only when the field is |
Boolean |
Multi-Select Picklist
Check whether a multi-select picklist resource’s value matches or contains another value or resource.
red; blue; green as a single value rather than three
separate values.| Operator | True If... | Supported Data Types |
|---|---|---|
| Contains | The value for Resource contains what you enter or select for Value. When you use this operator for a multi-select picklist resource, be aware of the values that a user can enter. To check that a specific value is included and that value is also included as part of another value, create a flow formula resource that uses the INCLUDES() function. For example, your org has a Color multi-select picklist value. Among the possible values are “green” and “yellow-green.” If both “green” and “yellow-green” are acceptable values, use the Contains operator in a flow condition. If only “green” is an acceptable value, create a formula that uses the INCLUDES() function. |
|
| Does Not Equal | The value for Resource doesn’t match what you enter or select for Value. Order matters. If you aren’t sure which order the values that you’re
checking for appear, use the INCLUDES() function in a flow formula. For example,
if you compare “red; blue; green” to “blue; green; red” using the Does Not Equal
operator, that condition resolves to |
|
| Equals | The value for Resource exactly matches what you enter or select for Value. Order matters. If you aren’t sure which order the values that you’re checking
for appear, use the INCLUDES() function in a flow formula. For example, if you
compare “red; blue; green” to “blue; green; red” using the Equals operator, that
condition resolves to |
|
| Is Blank | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value similar to Is Null. See Text. | Boolean |
| Is Null | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value. | Boolean |
| Was Set | The value for Resource is a field on a record
variable, and that field has a value during the flow run. Was Set is true whenever the field
has a value. The value comes from the flow, from the record when the flow started, from a
user edit, or from automation outside the flow. Was Set is false only when the field is |
Boolean |
Record
Check whether a record resource’s value matches another value or resource.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Does Not Equal | The value for Resource doesn’t match what you enter or select for Value. | Record with the same object type |
| Equals | The value for Resource matches what you enter or select for Value. | Record with the same object type |
| Is Blank | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value similar to Is Null. See Text. | Boolean |
| Is Null | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value. | Boolean |
$Record Fields in Record-Triggered Flows
In record-triggered flows, when you select a field on the $Record variable
as the Resource in a Decision element, the Is Changed operator is available regardless of
the field's data type. Is Changed compares the field's value before and after the triggering
record update using $Record__Prior.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Is Changed | The value of the selected Is Changed is true if the field was blank
before and now has a value, or if it had a value before and is now blank or Is Changed is available only in Decision elements in
record-triggered flows when the Resource is a field on the
|
Boolean |
Stage
Check whether a Stage
resource or the $Flow.CurrentStage global variable matches, ends with, or
starts with another value or resource.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Does Not Equal | The value for Resource doesn’t match what you enter or select for Value. |
|
| Equals | The value for Resource matches what you enter or select for Value. |
|
| Ends With | The end of the value for Resource matches what you enter or select for Value. |
|
| Is Blank | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value similar to Is Null. See Text. | Boolean |
| Is Null | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value. | Boolean |
| Starts With | The beginning of the value for Resource matches what you enter or select for Value. |
|
Check whether $Flow.ActiveStages contains a particular stage, matches
the value of a Text collection, or is null.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Contains | $Flow.ActiveStages contains an item that matches what you select for Value. |
|
| Does Not Equal | The Resource collection doesn’t match $Flow.ActiveStages. |
Text collection |
| Equals | The Resource collection matches $Flow.ActiveStages. |
Text collection |
| Is Null | $Flow.ActiveStages value is either not set or references no
value. |
Boolean |
Text
Check whether a Text resource’s value matches, contains, ends with, or starts with another value or resource.
{!varText}
Contains
green evaluates to true whether the value is "Green," "GREEN," or
"green."- Flow converts values to strings before comparing them to the text resource.
- Stages resolve to the fully qualified stage name: namespace.flowName:stageName or flowName:stageName.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Contains | The value for Resource contains what you enter or select for Value. |
|
| Does Not Equal | The value for Resource doesn’t match what you enter or select for Value. |
|
| Equals | The value for Resource matches what you enter or select for Value. |
|
| Ends With | The end of the value for Resource matches what you enter or select for Value. |
|
| Has Error | Available in Decision elements only when the selected Resource is a flow element that has an error during the flow interview. The Create Records element supports this operator. |
|
| Is Blank | The value for Resource is set to zero characters or only white space. Use to determine whether a field or variable value is set to zero characters or only white space. | Boolean |
| Is Null | The value for Resource is either not set or references no value. Use to determine whether a field or variable value is set to no value. | Boolean |
| Starts With | The beginning of the value for Resource matches what you enter or select for Value. |
|
| Was Set | The value for Resource is a field on a record
variable, and that field has a value during the flow run. Was Set is true whenever the field
has a value. The value comes from the flow, from the record when the flow started, from a
user edit, or from automation outside the flow. Was Set is false only when the field is |
Boolean |
| Was Visited | Available in Decision and Wait elements only when the selected Resource is a flow element that was visited during the flow interview. The Create Records element supports this operator. |
|
Time
Check whether a Time resource’s value matches, is before, or is after another value or resource.
| Operator | True If... | Supported Data Types |
|---|---|---|
| Does Not Equal | The value for Resource doesn’t match what you enter or select for Value. | Time |
| Equals | The value for Resource matches what you enter or select for Value. | Time |
| Greater Than | The value for Resource is a later time than what you enter or select for Value. | Time |
| Greater Than or Equal | The value for Resource is a later time than what you enter or select for Value or is the same time. | Time |
| Is Blank | The value for Resource is either not set or references no value. Use it to determine whether a field or variable value is set to no value similar to Is Null. See Text. | Boolean |
| Is Null | The value for Resource is either not set or references no value. Use it to determine whether a field or variable value is set to no value. | Boolean |
| Less Than | The value for Resource is an earlier time than what you enter or select for Value. | Time |
| Less Than or Equal | The value for Resource is an earlier time than what you enter or select for Value or is the same time. | Time |
