Use a CAML Query to Get Information from SharePoint
Use the CAML Query activity to make a query to get information from SharePoint.
Examples
Prerequisites
- Access Tokens for your SharePoint application.
Good to Know
- In most text fields, you can use process data variables as an alternative to literal data values.
- You can configure whether this activity waits for other activities before it runs.
For more information, refer to How Do I Configure an Activity to Wait for Other Incoming Activities?
- Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation, and it is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business uses cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, and other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?
How to Start
- On the Application Explorer screen, do one of these:
- Do one of these:
- Add an activity:
- In the Process Builder, go to the Activity Library, and open the SharePoint tab.
- On the SharePoint tab, drag the CAML Query activity onto your process.
- Change an activity:
- In your process, double-click your activity.
- Add an activity:
- Click CAML Query Builder .
Procedure
- On the Configure CAML Query screen, in the SharePoint field, select your SharePoint access token.
To create a new access token, click Add Token . For more information, refer to Access Token for SharePoint.
- In the Site URL list, select your site.
- On the List and View Fields tab, complete these fields:
Field Name Definition List
- Function:
- Specifies the name of your SharePoint list .
- Accepted Values:
- The name of your SharePoint list.
- Default Value:
- None
- Accepts Process Data Variables:
- Yes
Show Hidden Fields
- Function:
- Specifies if you can use hidden columns in SharePoint for your CAML query.
- Accepted Values:
- Deselected - The SharePoint hidden columns are not available for your CAML query.
- Selected - The SharePoint hidden columns are displayed in the Possible View Fields box, so you can use them for your CAML query.
- Default Value:
- Deselected
Possible View Fields
- Function:
- Shows all the columns of the specified SharePoint list.
- Accepted Values:
- A SharePoint column selected from the list.
- Default Value:
- None
- Accepts Process Data Variables:
- No
- Limitations:
-
Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation, and it is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business uses cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, and other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?
Configured View Fields
- Function:
- Specifies the SharePoint columns that are included in the CAML query.
- Accepted Values:
- A list of columns moved from the Possible View Fields box using the Left Arrow button.
To remove a column from the list, select the column, and then click the Right Arrow button.
- Default Value:
- None
- Accepts Process Data Variables:
- No
- Limitations:
-
Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation, and it is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business uses cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, and other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?
- On the Where Clause tab, build your query with the Column, Comparer, and Value field.
Example:
Field Name Value Column
Id
Comparer
=
Value
123
Select Id, Name, ShippingCity from Account where Id = '123'
- On the Grouping tab, specify the grouping of SharePoint list data in ascending or descending order.
- On the Query Options tab, specify how and where CAML query operations are performed in the SharePoint list.
Field Name Definition Row Limit
- Function:
- Specifies the maximum number of rows to get with the CAML query.
- Accepted Values:
- Deselected - Specifies to get 10,000 maximum from the CAML query.
- Selected - Gets the specified number of records.
- Default Value:
- Deselected
Include Mandatory Columns
- Function:
- Specifies that mandatory columns are in the CAML query results.
- Accepted Values:
- Selected - The mandatory columns are in the CAML query results.
- Deselected - The mandatory columns are not in the CAML query results.
- Default Value:
- Selected
Specify A Folder
- Function:
- Specifies the location of a folder in which to execute the CAML query.
- Accepted Values:
-
- Selected - The activity runs the CAML query at the folder location.
- Look in All Folders and Subfolders - The CAML query is run in all the folders and their subfolders.
- Specify a Folder URL like http://machinename:port/sitename/doclib/folder - The CAML query runs only in the specified folder.
- Deselected - The activity runs the CAML query in the entire SharePoint database.
- Selected - The activity runs the CAML query at the folder location.
- Default Value:
- Selected
- Accepts Process Data Variables:
- No
Fetch Recursively
- Function:
- Specifies if the CAML query runs only in the specified folder and its subfolders.
- To Open this Field:
-
- Select Specify a Folder Relative URL like Folder/Subfolder.
- Accepted Values:
-
- Selected - The CAML query runs only in the specified folder and its subfolders.
- Deselected - The CAML query runs only in the specified folder.
- Default Value:
- Selected
- Accepts Process Data Variables:
- No
- On the Schema tab, select Map Response to AgilePoint Schema.
- Click the Schema Mapping button.
- On the Schema Mapper screen, map the response columns to the schema elements.
- To validate your query, on the Test Query tab, click Test Query. Fix any errors that occur.