SharePoint Add ListItem
The SharePoint Add ListItem activity not only supports adding one or more list items to an existing Microsoft SharePoint list but also adds list items across Microsoft SharePoint sites if each list has the same name and column names with the same sequence order.
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.
- Batch operations. You can add multiple list items at a time. If you want to add the data collection to the Microsoft SharePoint list in batch, you can use the For-Each statement to map the data collection to the input fields in the SharePoint Add ListItem activity.
The SharePoint Add ListItem activity does not support adding a file to the Meeting workspace library in Microsoft SharePoint.
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 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 SharePointAddListItem. |
| SharePoint Connection | Yes | (Required) Click the
If no matching SharePoint Connection shared resources are found, click Create Shared Resource to create one. See Creating a SharePoint 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 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 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 examples list 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 25 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 25 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 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 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 Add ListItem activity:
| Error Schema Element | Data Type | Description |
|---|---|---|
| SharePointPluginException | ||
| msg | String | Displays the error message returned by the plug-in. |
| msgCode | String | Displays the error code returned by the plug-in. |
| SharePointRemoteException | ||
| 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. |