The ForEach step is useful when you want to view or manipulate each element in an array which is in a record. The ForEach step iterates over the record array to process each element in the array.
Illustrated in the below image is an example of a flow of how the ForEach step is used.
The Record Generator is used as a source step to populate data and an array is included in the record as shown in the image below.
The below image is the output of the data that is in the Record Generator.
The ForEach step is then added to process each element in the array. To add the array name in the ForEach step, click on the highlighted icon in the below image.
The below page will appear. The Array Path is the name of the array that is in the record. In this example, “tasks” is the array in the record.
Illustrated in the below image is the output in the ForEach sub-flow. It breaks up each element in the array to process it by becoming separate records.
The output outside of the ForEach sub-flow is the original record as shown in the below image.