SAP Help Home SAP Intelligent RPA Help Portal SAP Intelligent RPA Community

Module - Sharepoint List

Set of activities related to a Sharepoint List.

Activities

Select Site

Select Site


Technical Name Type Minimal Agent Version
selectSite asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
webUrl string optional The web URL of the site where the list is stored. If this is empty the user's home site is used. Use the Search Site activity to get the web URL.

Output Parameters:

Name Type Description
displayName string Display name of the site

Sample Code:

await irpa_365online.sharepointList.selectSite("https://compagny-my.sharepoint.com/personal/myUserName");

Errors:

Error Class Package Description
InvalidArgument irpa_core webUrl is not valid.
RequestError irpa_core Error selecting site.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call graphAPI.


Select List

Selects a list from the current site. To change the current site, use the Select Site activity to change the site before you select a list.


Technical Name Type Minimal Agent Version
selectList asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
listId string mandatory The ID of the list within the site. You retrieve this using the Enumerate Lists activity.

Output Parameters:

Name Type Description
listDisplayName string Display name of the list

Sample Code:

await irpa_365online.sharepointList.selectList('12345-6789');

Errors:

Error Class Package Description
RequestError irpa_core Error selecting list.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call graphAPI.


Create List

Creates a list from the current site. To change the current site, use the Select Site activity to change the site before you create a list.


Technical Name Type Minimal Agent Version
createList asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
displayName string mandatory Display name of the list
columns Array.<irpa_365online.columnDescriptionCreation> mandatory Columns to be created

Output Parameters:

Name Type Description
listId string ID of the list created

Sample Code:

await irpa_365online.sharepointList.createList('myList', [{ displayName: "book", description: undefined, type: "text", indexed: false }]);

Errors:

Error Class Package Description
RequestError irpa_core Error creating list.
InvalidArgument irpa_core Invalid column name (already existing or Microsoft reserved) or indexation error on the column type.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call graphAPI.


Delete List

Deletes a list from the current site. To change the current site, use the Select Site activity to change the site before you delete a list.


Technical Name Type Minimal Agent Version
deleteList asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
listId string mandatory List ID

Sample Code:

await irpa_365online.sharepointList.deleteList('1234-5678');

Errors:

Error Class Package Description
RequestError irpa_core Error deleting list.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call graphAPI.


List Columns

Lists the columns of the selected list


Technical Name Type Minimal Agent Version
listColumns asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Output Parameters:

Name Type Description
columns Array.<irpa_365online.columnDescription> Properties of the columns

Sample Code:

await irpa_365online.sharepointList.listColumns();

Errors:

Error Class Package Description
RequestError irpa_core Error listing column.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call graphAPI.


Delete Column

Deletes a column in the selected list


Technical Name Type Minimal Agent Version
deleteColumn asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
columDisplayName string mandatory Display name of the column

Sample Code:

await irpa_365online.sharepointList.deleteColumn('book');

Errors:

Error Class Package Description
RequestError irpa_core Error deleting column.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call graphAPI.


Search Items

Search items from the selected list


Technical Name Type Minimal Agent Version
searchItems asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
itemFieldSearchCriterion Array.<irpa_365online.itemFieldSearchCriterion> optional Item Search Criterion

Output Parameters:

Name Type Description
items Array.<irpa_365online.listItemValues> Lists the items in the list

Sample Code:

await irpa_365online.sharepointList.searchItems();

Note:

The SDK does not support complex types and labels them as unsupported, as they are Microsoft-specifically managed.

Errors:

Error Class Package Description
InvalidArgument irpa_core Searches can't be performed on columns of type multiLineText.
Error irpa_core Large lists need to be indexed to be filtered.
RequestError irpa_core Error getting items.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call graphAPI.


Add Items

Add items to the selected list


Technical Name Type Minimal Agent Version
addItems asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
items Array.<irpa_365online.listItem> mandatory Array of items to add to the selected list

Sample Code:

await irpa_365online.sharepointList.addItems([[{ columnDisplayName: 'page', value: 200 }, { columnDisplayName: 'book', value: 'Alice in Wonderland' }], [{ columnDisplayName: 'page', value: 1200 }, { columnDisplayName: 'book', value: 'The Lord of the Rings' }]]);

Errors:

Error Class Package Description
RequestError irpa_core Error adding item.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call graphAPI.
RequestError irpa_core Text (monoline) fields are limited to 255 characters. If the size is exceded, a Bad Request Error exception is thrown.


Update Item

Update the fields of an item in the selected list


Technical Name Type Minimal Agent Version
updateItem asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
itemId string mandatory Item to be updated (identified by its ID). Retrieve the item using the Search List Items activity.
itemFields Array.<irpa_365online.itemField> mandatory Field of the item to be updated

Sample Code:

await irpa_365online.sharepointList.updateItem('3', [{color: 'blue'}]);

Errors:

Error Class Package Description
RequestError irpa_core Error updating item.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call graphAPI.


Delete Item

Deletes an item in the selected list


Technical Name Type Minimal Agent Version
deleteItem asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
itemId string mandatory ID of the list item to be replaced

Sample Code:

await irpa_365online.sharepointList.deleteItem('3');

Errors:

Error Class Package Description
RequestError irpa_core Error updating items.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call graphAPI.