SharePoint Query
The SharePoint Query activity supports querying list items across different Microsoft SharePoint lists and websites in a specific site collection.
General
On the General tab, you can establish a connection to a Microsoft SharePoint server, and set the query condition for the process.
The following table lists the configurations on the General tab of the SharePoint Query 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 SharePointQuery. |
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. |
Query Scope | No | (Required) Specify the scope that the query operation covers. The following options of the query scope are available:
|
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 Template | No | (Required) Choose a list to be used as the template to generate the CAML query.
Click Fetch Lists to get available lists from the site selected in the Web Name field. |
CAML Source | No | (Required) Specify the query schema of Collaborative Application Markup Language (CAML). The following options of the CMAL source are available:
|
Max Size | Yes | (Required) Specify the maximum numbers of list items that are returned by the query. The default value is
2000.
Note: If a large number of records that match the query conditions display in the field, you can use this property to limit the total numbers of list items that are returned by the query.
|
Timeout(sec) | Yes | (Required) Specify how long the plug-in waits for the process to perform the query operation. The default value is
120.
Note: The query 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 query operation to perform.
|
Description
On the Description tab, you can enter a short description for the SharePoint Query activity.
Input
On the Input tab, you can specify the list item that you want to query.
The following table lists the input elements on the Input tab of the SharePoint Query activity:
Input Item | Data Type | Description |
---|---|---|
FieldValues | N/A | The attributes of the selected item. It varies with different list types. See
Input Guidelines for details about how to provide a valid input.
This field only is displayed when you select Simple CAML as the CAML source. |
CAMLText | String | The CAML query. You can manually type in a query or you can use the generated query from the previous activity in the current process.
This field only is displayed when you select Input CAML as the CAML source. Note: The root node of the CAML query must be
Where .
|
Output
On the Output tab, you can view all results that match the query condition.
The following table lists the output elements on the Output tab of the SharePoint Query activity:
Output Item | Data Type | Description |
---|---|---|
ResultCount | Integer | The number of results returned by the query. |
QueryScope | String | The scope that the query operation covers. |
QueryMode | String | The mode of the query. The possible values are
SimpleCAML and
InputCAML .
|
Results—include all the items that match the query condition. | ||
Item | N/A | The attributes of the queried item. It varies with different list types. For the meaning of each attribute, see the Microsoft SharePoint documentation for more details. |
Fault
On the Fault tab, you can find the error code and error messages of the SharePoint Query activity. See Error Codes for more detailed explanation of errors.
The following table lists error schema elements on the Fault tab of the SharePoint Query 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 Query operation times out. |
msgcode | String | Displays the error code when the Query operation times out. |