Use a CAML Query to Get Information from SharePoint

Use the CAML Query activity to make a query to get information from Salesforce.

Configure CAML Query Screen



Prerequisites

Good to Know

How to Start

  1. On the Organizer, 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 tab.
      2. On the SharePoint tab, drag the CAML Query activity onto your process.
    • Change an activity:
      1. In your process, double-click your activity.
  3. Click CAML Query Builder .

Procedure

  1. 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 New SharePoint Access Token.

  2. In the Site URL list, select your site.
  3. On the List and View Fields tab, complete these fields:
    Field Name Definition

    List Name

    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

    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
  4. 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'
  5. On the Grouping tab, specify the grouping of SharePoint list data in ascending or descending order.
  6. 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 is run 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
  7. On the Schema tab, select Map Response to AgilePoint Schema.
  8. Click the Ellipses button.
  9. On the Schema Mapper screen, map the response columns to the schema elements.
  10. To validate your query, on the Test Query tab, click Test Query. Fix any errors that occur.