SharePoint REST Add ListItem
The SharePoint REST Add ListItem activity not only supports adding one or more list items to an existing Microsoft SharePoint list.
This activity supports the following functions:
- Adding a data item or a folder in a generic list.
- Adding a document library item, a document link, or a folder in a document library.
- You can add multiple list items at a time. If you want to add the data collection to the Microsoft SharePoint list, you can use the For-Each statement to map the data collection to the input fields in the SharePoint REST Add ListItem activity.
The SharePoint REST Add ListItem activity does not support adding an item of any content type under Microfeed list type.
General
On the General tab, you can establish a connection to a Microsoft SharePoint server, specify the list item that you want to add, and set the Timeout time for calling the process.
The following table lists the configurations on the General tab of the SharePoint REST Add ListItem activity:
Field | Module Property ? | Description |
---|---|---|
Name | No | (Required) Specify the name to be displayed as the label for the activity in the process. The default value is SharePointRestAddListItem. |
SharePoint REST Connection | Yes | (Required) Click the
![]() If no matching SharePoint REST Connection shared resources are found, click Create Shared Resource to create one. See Creating a SharePoint REST Connection for more details. |
Web Name | No | (Required) Get the target website.
Click Fetch Webs to get available websites from the site collection specified in the SharePoint Connection shared resource. |
List Name | No | (Required) Get the list that you want to operate on.
Click Fetch Lists to get available lists from the site selected in the Web Name field. |
Content Type | No | (Required) Specify the content type used to define the list item.
Click Fetch Content Types to get available content types of the selected list. |
Timeout(sec) | Yes | (Required) Specify how long the plug-in waits for the process to perform the add operation. The default value is
120.
Note: The add operation might fail or succeed if it times out when started at run time. The result is undefined. You have to provide enough time for the add operation to perform.
|
Description
On the Description tab, you can enter a short description for the SharePoint REST Add ListItem activity.
Input
On the Input tab, you can specify the list item that you want to add.
The following table lists the input elements on the Input tab of the SharePoint REST Add ListItem activity:
Input Item | Data Type | Description |
---|---|---|
WebName | String | The target website. You can use the activity to add list items across Microsoft SharePoint sites. You can add a group to this activity, and get the website from a previously performed activity in the current process.
Note: The value specified in this parameter takes precedence over the one set in the
General tab.
|
RootFolder | String | The folder used to store the new list item in the Microsoft SharePoint server.
The following example describes the string format:
If you leave this parameter empty, the root folder is used as the default storage. Note: Ensure that the folder provided exists in the Microsoft SharePoint list.
|
Item | N/A | The output of each attribute of the new item. The attributes vary with different content types. For the meaning of each attribute, see the Microsoft SharePoint documentation for more details. |
Upload Document to Document Library
The following parameters are displayed when you upload a document to a Microsoft SharePoint document library. |
||
FileName | String | The file name given to the file when it is uploaded to the Microsoft SharePoint server. |
LocalFileLocation | String | The complete path of the source file.
Note: You must specify a value either in the input item or in the
FileContent input item. Ensure that the size of the file is less than 250 MB.
|
FileContent | binary | The binary content of a file, which is transferred from a previous activity in a process.
Note: The size of the file has to be less than 100 MB.
|
OverwriteExistFile | Boolean | Whether you want to overwrite the existing file.
If you leave the field empty, the value of
|
Output
On the Output tab, the Success node lists the status of all the operations, and the Results node lists the status of the current operation.
The following table lists the output elements on the Output tab of the SharePoint REST Add ListItem activity:
Output Item | Data Type | Description |
---|---|---|
Success | Boolean | This property indicates the status of all of the operations. If no error occurs when adding one or more records, the status true is returned. |
Results | ||
Result | The
Result element contains the following elements:
|
Fault
On the Fault tab, you can find the error code and error messages of the SharePoint REST Add ListItem activity. See Error Codes for more detailed explanation of errors.
The following table lists error schema elements on the Fault tab of the SharePoint REST Add ListItem activity:
Error Schema Element | Data Type | Description |
---|---|---|
SharePointRestPluginException | ||
msg | String | Displays the error message returned by the plug-in. |
msgCode | String | Displays the error code returned by the plug-in. |
SharePointRestRemoteException | ||
msg | String | Displays the error message of the Microsoft SharePoint system when processing a request from the plug-in. |
msgcode | String | Displays the error code of the Microsoft SharePoint system when processing a request from the plug-in. |
encoding | String | Displays the error encoding of the Microsoft SharePoint system when processing a request from the plug-in. |
ActivityTimedOutException | ||
msg | String | Displays the error message when the Add ListItem operation times out. |
msgcode | String | Displays the error code when the Add ListItem operation times out. |