ForLoop

The ForLoop component enables iterative execution of logic within an automation. The iterations cease either when an iteration limit is reached or if the Break event node is triggered. The main methods and events for the ForLoop are contained in the design block. Properties can be set from the Properties grid. See the General Component Properties Methods Events topic for additional information.

Properties:

 

Property

Description

Broken

Gets a value of True if the Break event node is triggered.

Increment

Sets an integer value representing the amount by which the index is increased each time the loop executes. The default is 1.

Index

Gets the ForLoop index value (integer). On the first iteration, the index is equal to the Initial property value.

Initial

Sets an integer representing the ForLoop starting Index value.

Limit

Sets an integer representing the index value at which the loop halts execution. For example, if the limit is 9 and the initial value is 0, then the control would yield 9 iterations and have a final Index value of 8. Note that if you set the Limit to -1, OpenSpan Studio interprets this as an infinite limit. In this case, the ForLoop will execute until the Break method is called.

 

Events:

 

Event

Description

Completed

Triggered when the ForLoop has reached the Limit value and the Break event has not been triggered.

Yielded

Triggered when an iteration is complete.

 

Methods:

 

Event

Description

Parameters

Result Type

Break

Trigger this method's  event node to halt execution of the ForLoop. The ForLoop Break output node is triggered once the ForLoop has halted due to triggering of the Break input event.

 

None

Void

StartLoop

Trigger this method's event node to begin the ForLoop iterations. The StartLoop output event node is triggered when the ForLoop begins iterations.

 

None

Void

 

See also

Using the ForLoop Component