Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

ForLoop

Updated on October 19, 2022

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.

Properties

PropertyDescription
BrokenGets a value of True if the Break event node is triggered.
IncrementSets an integer value representing the amount by which the index is increased each time the loop executes. The default is one (1).
IndexGets the ForLoop index value (integer). On the first iteration, the index is equal to the Initial property value.
InitialSets 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 nine (9) and the initial value is zero (0), then the control would yield nine iterations and have a final Index value of eight (8).

Note: If you set the limit to -1, Studio interprets this as an infinite limit. In this case, the ForLoop will execute until the Break method is called.

SensitiveCheck the box to hide this component's values in logs and the Automation Surface.

Events

CompletedTriggered when the ForLoop has reached the Limit value and the Break event has not been triggered.
YieldedTriggered when an iteration is complete.

Methods

BreakTrigger 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. NoneVoid
StartLoopTrigger this method's event node to begin the ForLoop iterations. The StartLoop output event node is triggered when the ForLoop begins iterations. NoneVoid

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us