Foreach

The Foreach action node loops over objects in a data source and runs a block of action nodes for each object.

Usage

This action node is used to run a block of other action nodes repeatedly. The block will be run once for each object in the data source according to the object selection. On each iteration, the current object becomes the object in context.

Good to know

If you want to update or delete a selection of objects use the Update object or Delete objects action nodes.

Example

Your app has a data source containing all projects. You'd like to iterate over active projects to calculate resource utilization.

Use Foreach to loop over a filtered selection of projects with a filter Project.State EQUALS Active to only iterate over active projects.

Showroom

A Foreach example is available in our Showroom. You can view the demo, as well as access the setup in Appfarm Create. Don't have access? Register.

Properties

PropertyDescription

Data Source

Select a multi-cardinality data source containing the objects to iterate over. You may also select a multi-reference property (an Object Class Property with Cardinality Many), and iterate over the referenced objects.

Selection

Define the objects to update.

Filter

Available when Selection is Filtered selection. Define the filter to apply to the data source.

Execution Mode

Sequential: The default. All action nodes inside the Foreach loop will be executed in sequence. Paralell: Execute all action nodes inside the Foreach loop in paralell.

Last updated