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.

Examples

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

  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:
This is a common configuration field that is used in many examples. Refer to:
  • Examples - Step-by-step use case examples, information about what types of examples are provided in the AgilePoint NX Product Documentation, and other resources where you can find more examples.

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.
Example:
Refer to:

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
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?

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
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?

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.
Example:
Refer to:

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
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?

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.
Example:
Refer to:

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.
Example:
Refer to:

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.
Example:
Refer to:

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.
Example:
Refer to:

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
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?

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.
Example:
Refer to:

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.