|: Video example of this widget|
The Repeat For Each Item widget executes a series of other widgets for each item in a list. The widget can run for all items in a list, or can be limited to a specific start and end item.
NOTE: For widgets dropped inside the Repeat For Each Item widget, Current Item refers to the item the workflow was started on. It does NOT refer to the item the Repeat For Each Item widget is currently on in the loop. To execute a widget against the current item in the loop, use a Field Lookup to the Repeat For Each Item widget Lookup Item ID variable.
When specifying Start Item or End Item conditions based on criteria in a SharePoint Person or Group column configured to allow multiple values, the SharePoint column values must be listed in the exact order specified in the widget. For example: If the widget is waiting for the Person or Group column to change to User1; User2, SharePoint column values entered as User2; User1 will not match.
When specifying specific Start Item or End Item conditions based on criteria in a SharePoint Choice column configured to allow multiple values, you cannot select the values in the widget like you can for single Choice columns. You must enter them as text or a lookup to text in the format Value1, Value2 (the space after the comma is required). The values must be entered in the same order they appear in the SharePoint column.
- The widget processes one item per loop, with a minimum one-minute delay between items. This can result in a long-running workflow if Repeat for Each Item is processing a list containing many items. Use Start Item and End Item conditions to limit the number of items processed.
|Repeat Settings||Click the button to select items for loop widgets to execute on. If you do not make any selections, the loop will start with the first item in the list and continue in order by SharePoint ID to the last item in the list.|
|Site Collection/Site/List||To execute loop widgets on list items in the current site, select a list in the List box. To execute loop widgets on list items in another site or site collection, make the desired selections in the Site Collection and Site boxes, and then select a List and a View.|
Select the first item in the list to start executing loop widgets on.
Select the last item in the list to execute loop widgets on.
The loop will execute for items in the list until the End Item condition is matched, and then exit. Widgets are not executed on the End Item.
|Store Loop Item ID (Required)||Select a workflow variable with a Number data type. The Loop Item ID variable stores the ID of the current item in the loop. You can use this ID with a Field Lookup to execute widgets on the current item in the loop not the Current Item (which refers to the item the workflow was started on). Create variables in the Workflow Settings tab in the settings pane, or click the Create new variable link next to the variable list.|
|Loop Delay (minutes)||
Enter the delay between items processed by the widget, in minutes. Each loop processes a single item in the list. The minimum delay is one minute.
|Click Apply to save the widget settings.|
Return to Workflow Logic Widgets List
- Overview of Lookup Selector
- Using Lookups in Workflow Studio
- About Workflow Conductor Widgets
- Alphabetical List of Workflow Conductor Widgets