Do a Loop to Repeat an Action
To configure the loop to start the action, do the procedure in this topic.
Examples
- (Example) Create a Loop to Repeat an Action and Store the Information in a SharePoint List
- (Example) Configure an Initialize Loop Activity to Store the Leave Information
- (Example) Configure a Next Loop Activity to Repeat Store Leave Information Action in the Human Resources Example Subprocess
- Examples - Step-by-step use case examples, information about what types of examples are provided in the AgilePoint NX Product Documentation, and other resources where you can find more examples.
Prerequisites
- To operate, the Initialize Loop activity must have a Next Loop activity immediately after
the Condition activity in your process flow.
For more information, refer to:
Good to Know
- In most text fields, you can use process data variables as an alternative to literal data values.
- When you configure a Next Loop activity immediately after a Condition activity, the variables defined in the Initialize Loop activity are populated in the Next Loop activity. If you try to use the variables in any activity between the Condition and the Next Loop, the variables will not have the correct data.
- You can configure whether this activity waits for other activities before it runs.
For more information, refer to How Do I Configure an Activity to Wait for Other Incoming Activities?
How to Start
- On the Application Explorer screen, do one of these:
- Do one of these:
- Add an activity:
- In the Process Builder, in the Activity Library, open the Utilities tab.
- On the Utilities tab, drag the Initialize Loop activity onto your process.
- Change an activity:
- In your process, double-click your activity.
- Add an activity:
- Click Looping Init .
Procedure
- Complete the fields on the
General Configuration screen.
For more information, refer to Configure General Options for a System Activity.
- Click Looping Init .
- On the Loop Configuration screen, complete these fields
as necessary.
Field Name Value Source Dataset
- Function:
- Specifies the repeating schema element from the Process Data > Form Data or Model Data tab that stores the list of child elements.
- Accepted Values:
- A valid repeating XML schema element.
- Default Value:
- None
- Accepts Process Data Variables:
- Yes
Current Row Variable
- Function:
- Specifies a process data variable that stores the values of a column in a data source.
- Accepted Values:
- A process data variable.
- Default Value:
- None
- Accepts Process Data Variables:
- Yes
Dataset Column Name
- Function:
- Shows the list of child elements from a repeating schema element.
- Accepted Values:
- A valid child element name.
- Default Value:
- None.
If you specify the repeating schema element in the Source Dataset field, the name of the child element shows.
- Accepts Process Data Variables:
- Yes
Exit loop when following variable set to true
- Function:
- Specifies a process data variable with a Boolean data type to exit the loop. When the variable is set to true, the loop completes, and the process moves forward.
- Accepted Values:
- A process data variable.
- Default Value:
- None
- Accepts Process Data Variables:
- Yes
- To complete the configuration, click OK.
- On the Common tab, drag the Condition activity onto your process immediately after the Initialize Loop activity.
- Configure the Condition activity to check if the loop exit variable in the Exit loop when following variable set to true field is set to true.
- On the Utilities tab, drag a Next Loop activity onto your process immediately after your Condition activity.
- On the General Configuration screen for the Next Loop activity, in the Loop Initiate Activity Name field, select the name of your Initialize Loop activity.