activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 15, 2024

For Each List Item

UiPath.MicrosoftOffice365.Activities.SharePoint.ForEachListItem

Description

Uses the Microsoft Graph Get list item API to perform an activity or a series of activities on each list item in the specified SharePoint list.
Note: This activity doesn't support persistence.

Project compatibility

Windows - Legacy | Windows

Configuration

Properties

Common
  • DisplayName - The display name of the activity. This property supports String variables and string formatted values.
Input
  • Filter - An optional OData filter.

    Note:
    It is highly recommended to use only indexed columns in the filter expression. The activity provides the Prefer: HonorNonIndexedQueriesWarningMayFailRandomly header to allow using non-indexed fields in the filter, but be warned that such queries may fail on large lists.

    The field name should be used in the filter expression and not in the field display name.

  • List - The Sharepoint list on which the operation is performed. This field supports only Office365SharepointList variables.
Misc
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports Boolean values.
Output
  • Index - A zero-based index that specifies which element of the current collection is being iterated. This field supports only integer and Int32 variables.

Filtering Examples

The following table shows examples of filters that can be useful when you query SharePoint list items:

Query

Filter Expression

All list items with value 'Normal' for field Priority

"fields/Priority eq 'Normal'"

All list items with value 'Completed' for field Status

"fields/Status eq 'Completed'"

All list items reported on 05/26/2021

"fields/DateReported eq '2021-05-26'"

All high priority list items that are not yet completed

"(fields/Priority eq 'High') and (fields/Status ne 'Completed')"

All list items that contain 'work' in field Title and have value True for field Internal

"substringof('work',fields/Title) and (fields/Internal eq 1)"

All list items that were logged by the user with Id 6 (the details about the user are stored in "User Information List" hidden list)

"fields/IssueloggedbyLookupId eq 6"

All list items with value 'john.smith@example.com' for EMail field (this is an example for "User Information List" hidden list)

"fields/EMail eq 'john.smith@example.com'"

All completed list items reported in June and assigned to the user with Id 6

"(fields/Status eq 'Completed') and (fields/DateReported ge '2021-06-01' and fields/DateReported le '2021-06-30') and (fields/AssignedtoLookupId eq 11)"

  • Description
  • Project compatibility
  • Configuration
  • Filtering Examples

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.