SharePoint Online - Update List Item

Overview

The SharePoint Online - Update List Item Snap updates the values of an existing list item in a SharePoint Online site.



Prerequisites

  • Valid SharePoint Online tenant and associated site.
  • Valid Azure application with all the required API permissions.

Snap views

Type Description Examples of upstream and downstream Snaps
Input

This Snap has exactly one document input view.

An input document contains the fieldValueSet specifying the fields to be updated.

Output

This Snap has exactly one document output view.

An output document contains the response after the list update operation.

Learn more about Error handling.

Snap settings

Note: Learn about the common controls in the Snap settings dialog.
Field/Field set Description
Label*

String

Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: SharePoint Online - Update List Item

Example: SharePoint Online - Update List Item

Site*

String/Expression

Specify the site name that contains the list of document library to be used in the subsequent settings.

Default value: N/A

Example: MySite

Custom Site Path

Checkbox

Enable this option if your site URL contains a custom path that deviates from the default site URL. Default site path always has a prefix 'sites/' before the sitename, a custom site can contain the prefix 'teams/' or it can have no prefix.

Default value: Deselected

List name*

String/Expression

Specify or select the name of the list. This field suggests all the lists that belong to the SharePoint Online site.

If you enable the Site property as an expression, then the document library is not suggested, resulting in an exception.

Default value: N/A

Example: DemoList

Item ID*

String/Expression

Select or enter the item id from the suggestion dropdown list of a specific list or use the expression to pass from the upstream document to perform the update item.

Learn more about updating an item in SharePoint Online: Refer to the Graph API in List Item - Update.

Default value: N/A

Example: WEE463484feffw

Update list item properties

Checkbox

Select this checkbox to update the properties of a list item, such as Content Type.

Default value: Deselected

Connection details Use this field set to specify connection properties to the SharePoint Online APIs.
Connection Timeout*

Integer

Specify the connection timeout duration in seconds.

Default value: 30

Example: 40

Number of Retries*

Integer

Specify the maximum number of reconnections in case of a connection failure or timeout.

Default value: 0

Example: 5

Retry interval (seconds)*

Integer

Specify the time interval in seconds between connection attempts.

Default value: 1

Example: 11

Snap execution

Dropdown list
Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only. Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all Snaps that are downstream from it.

Working with multi-select columns

When updating SharePoint Online list items using the SharePoint Online - Update List Item Snap, certain column types require additional OData metadata in the payload. This section explains how to populate the following column types:

  • Choice column configured with Allow multiple selections
  • Person or Group column configured with Allow multiple selections

Multi-value choice columns

For a SharePoint Choice column that allows multiple selections, Microsoft Graph API expects the value to be passed as an array of strings.

Add a field in the following format and set its value to "Collection(Edm.String)".

"{ChoiceColumnName}@odata.type": "Collection(Edm.String)"

Example: For a column named "ChoiceDemo", add the field [email protected] and set its value to Collection(Edm.String)

Column Name Type Allowed Values
ProjectCategories Choice (Multiple Selection) Finance, Operations


Multi-value person or group columns

For a SharePoint Person or Group column that allows multiple selections, Microsoft Graph API expects a collection of SharePoint user lookup IDs.

For a multi-select Person or Group column, configure the payload as follows:

  • "Collection(Edm.String)" - $Payload['<ColumnName>[email protected]']
  • ["382","21"] - $Payload.<ColumnName>LookupId

Example: For a column named ProjectApprover, configure the payload using [email protected] and ProjectApproverLookupId, where the values represent SharePoint user lookup IDs.

Column Name Type
ProjectApprover Person or Group (Multiple Selection)


Note: Use the SharePoint internal column name (metadata name) instead of the display name when configuring multi-value Choice or Person/Group columns. The internal name can be obtained from the column metadata returned by the SharePoint Read List Snap.

For example, if the display name is "Choice column Demo", but the metadata contains "name": "ChoicecolumnDemo", then use ChoicecolumnDemo in the payload and Mapper Snap configuration.



Troubleshooting

Error Cause Resolution
The specified listName/itemID was not found. The listname/itemID that you have entered might not be available in the site. Click the suggestion drop-down button and select listName, or enter the existing list name manually, or verify that the itemID exists.
Forbidden exception Either the user or app does not have sufficient permissions to read the metadata for the document library. Ensure you provide the desired permissions both at the user and application level.