For Each

Description

Container that executes the functors it contains once for every entry of a given table or lookup table, making each entry's key available to its contents through the internal output port Step.

Inputs

Name Type Description
Elements Base Table Type Table or lookup table whose entries the contained functors are executed for.

Optional Inputs

Name Type Description Default Value
Sequence Input None Type Ensures that the functor connected to this port finishes executing before this container starts. None

Outputs

Name Type Description
Sequence Output None Type Connect this port to another container's Sequence Input to make this container finish executing before that other container starts.

Internal Outputs

Name Type Description
Step Real Value Type Key of the current element being processed.

Group

Notes

Execution only takes place for entries whose key is greater than or equal to zero and whose associated value is non-zero; other entries in Elements are skipped.

Execution for multiple keys may happen simultaneously when there is no dependency between them.

When Elements can be empty and the results produced by the contained functors are used outside this container, use a junction functor (such as Table Junction or Lookup Table Junction) so a result is still available when this container executes zero times.

This functor was previously known as “ParallelForEach”; that name is still accepted for backward compatibility with existing scripts.

Internal Name

ForEach