You are here:
Add Values to a Collection Variable
After you create a collection variable, populate it with values to reference throughout your flow. You can’t use a Get Records element to populate a collection variable, but there are some workarounds.
Required Editions
| View supported editions. |
To use values from outside the flow, make sure that the collection variable is available for input. When the values come from outside the flow, the values can be set only when the flow interview starts.
| To add values that are stored in a... | Do this action... | For more information |
|---|---|---|
| Screen component | Add the field’s entered or stored value to a collection variable by using an Assignment element. | |
| Variable | Add the variable’s stored value to a collection variable by using an Assignment element. | |
| Record variable | Add one of the record variable’s stored field values to a collection variable by using an Assignment element. | |
| Record collection variable | Loop through the record collection variable. Within the loop, add one of the loop variable’s stored field values to a collection variable by using an Assignment element. |
You’re designing a flow that sends an email to all employees living in specific location. You create a record collection variable that collects all users who lives in San Francisco. Then you use the send email action that the flow sends an important update to those employees. For more information, see Send an Email with an Attachment in an Autolaunched Flow Example

