Configure Loop Elements Without Creating Loop Variables

When you add a Loop element to a flow, we create the loop variable for you. The loop variable temporarily stores the current item as the flow iterates over the collection variable's items. This change doesn’t affect Loop elements created before Summer ’20.

Where: This change applies to Lightning Experience and Salesforce Classic in Essentials, Professional, Enterprise, Performance, Unlimited, and Developer editions.

How: For any element in the loop path, when you set a field that supports variables, the current item shows up as an available option just like other variables in the flow.

To use the current item in other elements in the loop, start typing the API name of the Loop element.

In this example, when you start typing in the Value field, you see available variables in the flow, including the loop variable for the My_Loop element. As you type the Loop element’s API name in a Decision element, a menu lets you select the current item of the Loop element.


A loop variable is intended for use only within its loop. Its value is set at run time as the flow executes the Loop element.