Activities
latest
false
Banner background image
Productivity Activities
Last updated Apr 26, 2024

Working with SharePoint lists

About

This section describes how to work, filter, and iterate through SharePoint lists.

How to work with large SharePoint lists

Scenario: you have a SharePoint list that contains more than 5,000 items and want to use the For Each List Item and Get List Items activities.

Due to limitations in the underlying Microsoft Graph API, if these activities are used with the optional OData filter on a list this size, they fail with the following error:
"error": {
    "code": "notSupported",
    "message": "The request is unprocessable because it uses too many resources",
    "innerError": {
        "code": "tooManyResources",
        "date": "2023-05-01T04:27:00",
        "request-id": "93c12b1f-6bc5-4466-ae9f-2bfd2ca0ef6a",
        "client-request-id": "02996ac5-b700-8a1e-3c6d-7e6f0624fabe"
    }
 }"error": {
    "code": "notSupported",
    "message": "The request is unprocessable because it uses too many resources",
    "innerError": {
        "code": "tooManyResources",
        "date": "2023-05-01T04:27:00",
        "request-id": "93c12b1f-6bc5-4466-ae9f-2bfd2ca0ef6a",
        "client-request-id": "02996ac5-b700-8a1e-3c6d-7e6f0624fabe"
    }
 }
Solution

Add column indexes on the SharePoint list for the columns you plan to use in the optional OData filter. For information on how to add an index, see the Microsoft documentation.

For example, you have a SharePoint list with three columns: Title, FirstName, and LastName. You want to use the For Each List Item activity to filter on all LastName values equal to "Smith".

  1. Create an index on the LastName column in SharePoint. This allows the Microsoft Graph API to make a performant query and avoid returning an error.
  2. Set the OData filter in the UiPath activities to "fields/LastName eq 'Smith'", to perform the function described. This way no error occurs, even though the list is greater than 5,000 items in size.
Limitations

Even with indexing, the Graph API won't return successfully if the number of results to be returned is greater than 5,000.

  • Scenario 1: return less than 5,000 values while using an OData filter. Workaround: add an index, as described above.
  • Scenario 2: return more than 5,000 values, while using an OData filter. Workaround: remove the OData filter, to allow a return of more than 5,000 values, then filter in Studio (e.g., use a Filter Data Table activity).
Note: This API limitation impacts both classic List activities and the SharePoint Lists activities.

How to work with Person lookup fields

Starting with version 2.4.2 you can manage Person lookup fields by a component of the reference value. In the Person/Group type field, you can also add Person's email as String input.

Note that Person is a complex type with multiple fields. If a string input is received, it is assumed it contains the email address of the person, and no other sub-fields or ID.

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.