Studio Web
latest
false
Banner background image
Studio Web User Guide
Last updated May 16, 2024

Iterating through items

Iterating refers to repeating one or more activities in your automation project for each individual item in a collection of items. To iterate through items, add one of the available For Each activities in which you define the collection, and then add the activities to repeat inside the For Each. When you configure the activities to repeat, indicate that an activity should use data from each item in the iteration by using a variable and selecting the current item option for the For Each activity from the variable selector.

A generic For Each activity is available in the Control category, and various For Each activities are available for specific types of data. For example:

  • For Each Email (Microsoft 365 and Google Workspace) - Repeat one or more activities for each message in an email folder. The current item option is CurrentEmail.
  • For Each File/Folder - Repeat one or more activities for each file or folder in a OneDrive or SharePoint folder. The current item option is CurrentItem.
  • For Each Row in Workbook and For Each Row in Spreadsheet- Repeat one or more activities for each row in an Excel workbook and Google Spreadsheet respectively. The current item option is CurrentRow.
  • For Each Sheet in Workbook and For Each Sheet in Spreadsheet - Repeat one or more activities for each sheet in an Excel workbook and Google Spreadsheet respectively. The current item option is CurrentItem.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.