You are here:
Flow Operators in Assignment Elements
Use Assignment element operators to change the value of a selected resource.
Required Editions
| View supported editions. |
Use this reference to understand the supported operators. The list is organized according to the data type that you select for Resource.
Apex-Defined
Match the @AuraEnabled attribute’s Apex data type with a flow data type in this reference to determine which operators are supported.
| 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 |
| Time | Time |
Boolean
Replace a Boolean resource with a new value.
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | What you enter or select for Value replaces the value of Variable. | Boolean | Before Assignment: Assignment: After Assignment:
|
Collection
Update or replace the value of a collection variable or record collection variable.
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | Value replaces the value of Variable. | Collection of the same data type or object type Text, Picklist, and Multi-Select Picklist data types are compatible with each other. |
Before the Assignment:
Assignment: After the Assignment:
|
| Add | Value is added as a new item at the end of the collection in Variable. | Variable of the same data type or record variable of the same object type Text, Picklist, and Multi-Select Picklist data types are compatible with each other. Stages (including $Flow.CurrentStage) can be added to text collections. |
Before the Assignment:
Assignment: After the Assignment:
|
| Remove After First | The first instance of Value is found within the collection in Variable. All items after the first instance are removed from the collection in Variable. | Variable of the same data type or record variable of the same object type For text collections only:
|
Before the Assignment:
Assignment: After the Assignment:
|
| Add At Start | Value is added as a new item at the beginning of the collection in Variable. | Collection of the same data type or object type Variable of the same data type or record variable of the same object type For text collections only:
|
Before the Assignment:
Assignment: After the Assignment:
|
| Remove All | All instances of Value are removed from the collection in Variable. | Collection of the same data type or object type Variable of the same data type or record variable of the same object type For text collections only:
|
Before the Assignment:
Assignment: After the Assignment:
|
| Remove First | The first instance of Value is removed from the collection in Variable. | Collection of the same data type or object type For text collections only:
|
Before the Assignment:
Assignment: After the Assignment:
|
| Remove Before First | The first instance of Value is found within the collection in Variable. All items before the first instance are removed from the collection in Variable. | Variable of the same data type or record variable of the same object type For text collections only:
|
Before the Assignment:
Assignment: After the Assignment:
|
| Remove Position | Value specifies a position in the collection. The item at the position is removed from the collection in Variable. Make sure that Value at run time is a positive integer that is within the range of the number of items in the collection in Variable. |
Number | Before the Assignment:
Assignment: After the Assignment:
|
| Remove Uncommon | The items in the Value collection are found within the Variable collection. The found items are kept, and all other items are removed from the collection in Variable. | Collection of the same data type or object type | Before the Assignment:
Assignment: After the Assignment:
|
| Equals Count | The number of stages or collection items in what you enter for Value replaces the value of Variable. |
|
Before the Assignment:
Assignment: After the Assignment:
|
Currency and Number
Replace (Equals), add to (Add), or subtract from (Subtract) the value of a currency or number resource. Count (Equals Count) the number of active stages or the number of items in a collection.
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | The number that you enter or select for Value replaces the value of Variable. |
|
Before the Assignment: Assignment: After the Assignment: |
| Add | The number that you enter or select for Value is added to the value of Variable. |
|
Before the Assignment: Assignment: After the Assignment: |
| Subtract | The number that you enter or select for Value is subtracted from the value of Variable. |
|
Before the Assignment: Assignment: After the Assignment: |
Date
Replace (Equals), add to (Add), or subtract from (Subtract) the value of a date/time resource.
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | The date that you enter or select for Value replaces the value of Variable. |
|
Before the Assignment: Assignment: After the Assignment: |
| Add | Value is added, in days, to the selected Variable’s value. |
|
Before the Assignment: Assignment: After the Assignment: |
| Subtract | Value is subtracted, in days, from the selected Variable’s value. |
|
Before the Assignment: Assignment: After the Assignment: |
Date/Time
Replace a date/time resource with a new value (Equals).
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | The date that you enter or select for Value replaces the value of Variable. |
|
Before the Assignment: Assignment: After the Assignment:
|
Picklist
Replace a picklist resource with a new value (Equals) or concatenate a value onto the original value (Add).
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | What you enter or select for Value replaces the value of the selected picklist. |
|
Before the Assignment: Assignment: After the Assignment:
|
| Add | What you enter or select for Value is added to the end of the selected picklist. |
|
Before the Assignment: Assignment: After the Assignment:
|
Multi-Select Picklist
Replace a multi-select picklist resource with a new value (Equals), concatenate a value onto the original value (Add), or add a selection to the resource (Add Item).
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | What you enter or select for Value replaces the value of the selected multi-select picklist. |
|
Before the Assignment: Assignment: After the Assignment: |
| Add | What you enter or select for Value is added to the last item selected in the multi-select picklist. It doesn’t create a selection. Easily add items to a multi-select picklist resource by using the “add item” operator. To add
semi-colon-delimited items to a multi-select picklist variable with the “add”
operator, always add a single space after the semi-colon and don’t include a space
before the semi-colon. This way, you can compare the variable’s values to the
values of a multi-select picklist field from the Salesforce database. For example:
|
|
Before the Assignment: Assignment:
After the Assignment: |
| Add Item | What you enter or select for Value is added as a new selection to the end of the multi-select picklist. The Assignment automatically adds “;” before the new item. That way, Salesforce reads it as a separate item selected by the multi-select picklist. |
|
Before the Assignment: Assignment: After the Assignment:
|
Record
Replace a record variable with a new value (Equals).
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | The record variable that you select for Value replaces the value of Variable. | Record – with the same object type | Before the Assignment:
Assignment: After the Assignment: both
|
Stage
You can’t update the value of a stage, but you can update the values of the stage global
variables: $Flow.CurrentStage and $Flow.ActiveStages.
$Flow.CurrentStage
Replace the stage selected in $Flow.CurrentStage.
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | Value replaces the value of $Flow.CurrentStage. |
|
Before the Assignment: Assignment: After the Assignment:
|
$Flow.ActiveStages
Add or remove active stages in the $Flow.ActiveStages global variable.
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Add | Value is added to the end of $Flow.ActiveStages. |
|
Before the Assignment: Assignment: After the Assignment:
|
| Remove After First | The first instance of the stage in Value is found within
$Flow.ActiveStages. All stages after the first instance are
removed from $Flow.ActiveStages. |
|
Before the Assignment: Assignment:
After the Assignment:
|
| Add At Start | Value is added to the beginning of $Flow.ActiveStages. |
|
Before the Assignment: Assignment: After the Assignment:
|
| Remove All | All instances of Value are removed from
$Flow.ActiveStages. |
|
Before the Assignment: Assignment: After the Assignment:
|
| Remove First | The first instance of the stage in Value is removed from
$Flow.ActiveStages. |
|
Before the Assignment: Assignment:
After the Assignment:
|
| Remove Before First | The first instance of the stage in Value is found within
$Flow.ActiveStages. All stages before that first instance are
removed from $Flow.ActiveStages. |
|
Before the Assignment: Assignment:
After the Assignment:
|
| Remove Position | Value specifies a position in Make sure that
Value at run time is a positive integer that is within the range of the number of
stages in |
Number | Before the Assignment:
Assignment: After the Assignment:
|
| Equals Count | The number of stages or collection items in what you enter for Value replaces the value of Variable. |
|
Before the Assignment:
Assignment: After the Assignment:
|
Text
Replace a text resource with a new value (Equals) or concatenate a value onto the end of the original value (Add).
| Operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | The text that you enter or select for Value replaces the value of Variable. |
|
Before the Assignment: Assignment: After the Assignment: |
| Add | The text that you enter or select for Value is added to the end of Variable. |
|
Before the Assignment: Assignment: After the Assignment: |
Time
Replace a time resource with a new value (Equals).
| operator | Description | Supported Data Types | Example |
|---|---|---|---|
| Equals | The time that you enter or select for Value replaces the value of Variable. | Time | Before the Assignment:
Assignment: {!varTime} Equals 09:00 AM After the Assignment:
|

