CAML Query activity

An activity that creates a SharePoint view with the available data fields using a CAML query. Use the CAML Query activity to create your CAML query, and your view.


CAML Query activity

Configure the CAML Query activity

To configure the CAML Query activity, do the procedure in this topic.

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?

  • Documentation for Integrations with Third-Party, External, or Open Source Technologies

    The highest priority for AgilePoint NX Product Documentation is accuracy. Whenever feasible, AgilePoint provides input details, business rules, or example values for third-party integrations. These can include any technology that is not native to AgilePoint NX, such as Salesforce, Active Directory, or REST. However this information is subject to change without notice to AgilePoint. Because we can not guarantee the accuracy of this information, the details provided for third-party product input values, as well as examples for third-party product integrations, are limited in the AgilePoint documentation. It is the responsibility of third-party vendors to provide documentation related to these aspects of their software and services.

    For examples of use case implementations or configuration field input values for third-party products, AgilePoint recommends these resources:

    • AgilePoint Community Forums - An AgilePoint-moderated, crowd-sourcing user forum where you can ask questions about specific techniques, the solutions to use cases, workarounds, or other topics that may not be covered in the Product Documentation.
    • Professional Services - If you can not find the information you need for your specific business problem, mentoring is available through AgilePoint Professional Services.
    • Personalized Training - AgilePoint can provide personalized training for your organization. To request personalized training, contact AgilePoint Sales.
    • Third-Party Vendor Documentation - Whenever feasible, AgilePoint provides links to third-party vendor documentation.

      This does not include technology standards or protocols, such as JavaScript, REST, or FTP. Resources for these technical standards are publicly available on the Internet.

How to Start

  1. On the Application Explorer screen, do one of these:
  2. Do one of these:
    • Add an activity:
      1. In the Process Builder, go to the Activity Library, and open the SharePoint SharePoint icon tab.
      2. On the SharePoint SharePoint icon tab, drag the CAML Query CAML Query icon activity onto your process.
    • Change an activity:
      1. In your process, double-click your activity.

Procedure

  1. Complete the fields on the General Configuration screen.

    For more information, refer to Configure General Options for a System Activity.

  2. Click CAML Query Builder CAML Query Builder icon.
  3. Complete the fields on these screens.
    1. Configure CAML Query > List and View Fields tab.
    2. Configure CAML Query > Where Clause tab.
    3. Configure CAML Query > Grouping tab.
    4. Configure CAML Query > Code Snippet tab.
    5. Configure CAML Query > Query Options tab.
    6. Configure CAML Query > Schema tab.
    7. Configure CAML Query > Test Query tab.

    For more information, refer to Use a CAML Query to Get Information from SharePoint.

  4. (Optional) Click Advanced Advanced icon > E-mail Notifications E-mail Notifications icon.

    For more information, refer to Configure E-mail Notifications for Any Activity.

General Configuration

Specifies the basic settings for the CAML Query activity.

Figure: General Configuration screen

General Configuration screen

Fields

Field Name Definition

Display Name

Function:
Specifies the activity name that shows in your process.
Accepted Values:
One line of text that can have spaces.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Description

Function:
Specifies an optional text description for your activity.
Accepted Values:
More than one line of text.
Default Value:
None
Accepts Process Data Variables:
No

Configure CAML Query > List and View Fields tab

Creates a view from the available fields, or columns, in a SharePoint list.

Figure: Configure CAML Query > List and View Fields tab

Configure CAML Query List and View Fields tab

Fields

Field Name Definition

SharePoint

Function:
Specifies the access token that connects to your SharePoint site.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Add Token Add Token icon

Opens this Screen:
Access Token for SharePoint
Function of this Screen:
Configure an access token to connect to SharePoint.

Site URL

Function:
Specifies the URL for your SharePoint site.
Accepted Values:
A valid SharePoint site URL
Default Value:
None
Accepts Process Data Variables:
Yes
Example:

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

Left Arrow Left Arrow icon

Function:
Moves the selected fields from the Possible View Fields box to the Configured View Fields box.

Right Arrow Right Arrow icon

Function:
Moves the selected fields from the Configured View Fields box to the Possible View Fields box.

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

Configure CAML Query > Where Clause tab

Configures a Where clause to filter the results of a CAML query.

Figure: Configure CAML Query > Where Clause tab

Configure CAML Query Where Clause tab

Fields

Field Name Definition

SharePoint

Function:
Specifies the access token that connects to your SharePoint site.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Add Token Add Token icon

Opens this Screen:
Access Token for SharePoint
Function of this Screen:
Configure an access token to connect to SharePoint.

Site URL

Function:
Specifies the URL for your SharePoint site.
Accepted Values:
A valid SharePoint site URL
Default Value:
None
Accepts Process Data Variables:
Yes
Example:

Fields

Function:
Specifies the name of the SharePoint column.
Accepted Values:
Read only.
Default Value:
A list of names in the specified list.
Accepts Process Data Variables:
No

Add Condition Add Condition icon

Function:
Creates a condition row.

Select Nest Type

Function:
Specifies the use of logical AND and OR operators to nest conditions for the WHERE clause.
  • And - Specifies the logical AND operator.
  • Or - Specifies the logical OR operator.

You must set the nest type first, before defining the condition for the where clause.

Column

Function:
Specifies the name of the SharePoint column.
Accepted Values:
A valid SharePoint column name.

Drag the name the column from the Fields field and drop it into the Column Name field to build a condition.

Default Value:
None
Accepts Process Data Variables:
No
Example:
Title

Comparer

Function:
Specifies the operator to use in your WHERE clause.
Accepted Values:
  • =
  • !=
  • Contains
  • Begins with
  • Is Not Null
  • Is Null
Default Value:
=

Value

Function:
Specifies the value for the column.
Accepted Values:
A valid column value.
Default Value:
None
Accepts Process Data Variables:
Yes

Delete Delete icon

Function:
Deletes the row.

Configure CAML Query > Grouping tab

Groups SharePoint list data by a specified column name, either in ascending or descending order.

Figure: Configure CAML Query > Grouping tab

Configure CAML Query Grouping tab

Fields

Field Name Definition

SharePoint

Function:
Specifies the access token that connects to your SharePoint site.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Add Token Add Token icon

Opens this Screen:
Access Token for SharePoint
Function of this Screen:
Configure an access token to connect to SharePoint.

Site URL

Function:
Specifies the URL for your SharePoint site.
Accepted Values:
A valid SharePoint site URL
Default Value:
None
Accepts Process Data Variables:
Yes
Example:

Group By - Columns

Function:
Specifies the name of the SharePoint column to group the SharePoint records to get the required result set.
Accepted Values:
The name of your SharePoint list column.
Default Value:
None
Accepts Process Data Variables:
No

Sort By - Columns

Function:
Specifies the name of the SharePoint column that organizes the CAML query result set.
Accepted Values:
The name of your SharePoint list column.
Default Value:
None
Accepts Process Data Variables:
No

Sort By - Sort Order

Function:
Specifies the sort order for the result set.
Accepted Values:
  • Ascending
  • Descending
Default Value:
Ascending

Configure CAML Query > Code Snippet tab

Shows the code snippet that is generated from the WHERE clause.

Figure: Configure CAML Query > Code Snippet tab

Configure CAML Query Code Snippet tab

Fields

Field Name Definition

SharePoint

Function:
Specifies the access token that connects to your SharePoint site.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Add Token Add Token icon

Opens this Screen:
Access Token for SharePoint
Function of this Screen:
Configure an access token to connect to SharePoint.

Site URL

Function:
Specifies the URL for your SharePoint site.
Accepted Values:
A valid SharePoint site URL
Default Value:
None
Accepts Process Data Variables:
Yes
Example:

Code Snippet

Function:
Shows the code snippet the system creates for the CAML WHERE clause.
Accepted Values:
Read only.
Default Value:
None

Configure CAML Query > Query Options tab

Specifies how and where CAML query operations are performed in the SharePoint list.

Figure: Configure CAML Query > Query Options tab

Configure CAML Query Query Options tab

Fields

Field Name Definition

SharePoint

Function:
Specifies the access token that connects to your SharePoint site.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Add Token Add Token icon

Opens this Screen:
Access Token for SharePoint
Function of this Screen:
Configure an access token to connect to SharePoint.

Site URL

Function:
Specifies the URL for your SharePoint site.
Accepted Values:
A valid SharePoint site URL
Default Value:
None
Accepts Process Data Variables:
Yes
Example:

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.
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:
  1. 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

Configure CAML Query > Schema tab

Connects the SharePoint columns in a CAML query response to the nodes in an AgilePoint schema.

Figure: Configure CAML Query > Schema tab

Configure CAML Query Schema tab

Fields

Field Name Definition

SharePoint

Function:
Specifies the access token that connects to your SharePoint site.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Add Token Add Token icon

Opens this Screen:
Access Token for SharePoint
Function of this Screen:
Configure an access token to connect to SharePoint.

Site URL

Function:
Specifies the URL for your SharePoint site.
Accepted Values:
A valid SharePoint site URL
Default Value:
None
Accepts Process Data Variables:
Yes
Example:

Map CAML Query Response to AgilePoint Schema

Function:
Connects the SharePoint columns returned from the CAML query to the AgilePoint schema.
Accepted Values:
Click the Schema Mapping Schema Mapping icon button to open the Schema Mapper.

Use this screen to connect the response to the data model for your process.

Default Value:
None

Configure CAML Query > Test Query tab

Makes sure the specified CAML query is correct.

Figure: Configure CAML Query > Test Query tab

Configure CAML Query Test Query tab

Fields

Field Name Definition

SharePoint

Function:
Specifies the access token that connects to your SharePoint site.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Add Token Add Token icon

Opens this Screen:
Access Token for SharePoint
Function of this Screen:
Configure an access token to connect to SharePoint.

Site URL

Function:
Specifies the URL for your SharePoint site.
Accepted Values:
A valid SharePoint site URL
Default Value:
None
Accepts Process Data Variables:
Yes
Example:

Validate Query

Function:
Examines the CAML query, and shows a message if an error occurs.

If the CAML query runs successfully, the result shows in the box.