For Each Element

The for each element is used to perform a specified action to data sent to it. This is most commonly used as an expression to modify data sent to it through a buffer element.

The for each element is located in the Element Toolbox within Studio’s Application tab and Cloud tab.

Properties

The following properties can be changed for the for each element:

Name

The name of the element.

Triggers

The following triggers are available to execute events from within the for each element:

Triggered

Execute an event when the source element connected to the for each triggers.

Iterated

Execute an event for every value within the array from the iterate ability.

Abilities

The following abilities are available for the for each element when its source element triggers:

Trigger

Trigger the element(s) that follow the for each element.

Iterate

The array of values the for each evaluates.

Iterate Arguments    
Name Type Description
Value Array The value the for each will iterate.

Demo Projects

To view the ForEach element used within a project, click the demo’s name to open the project in Atmosphere and see how the element is set up.

Name Hardware Description
Ron Swanson Quote Demo ESP32 Demonstrates the For Each element by retrieving a list of Ron Swanson quotes. Each quote is then inserted into Cloud Storage and also sent to the ESP32 as a Cloud Event. The ESP32 will then print each quote to its debug console.