Single Select Lookup > SharePoint > SharePoint (CAML)

This topic shows how to create a lookup with SharePoint as a data source that uses a CAML query for the Single Select Lookup form control.

Background and Setup

Examples

Prerequisites

Good to Know

How to Start

  1. On the Single Select Lookup form control configuration screen, on the Configure tab, click Add Lookup.

    For information about how to open this screen, refer to Single Select Lookup form control.


    Click Add Lookup
  2. On the Select Data Source Type screen, select SharePoint.

    Select SharePoint
  3. Click Next.

SharePoint Type

Specifies the type of SharePoint lookup.

Figure: SharePoint Type screen

SharePoint Type screen

Good to Know

Fields

Field NameDefinition

SharePoint Type

Function:
Specifies the type of SharePoint lookup to create.
Accepted Values:
  • SharePoint Lookup - Creates a SharePoint lookup with a CAML query.
  • SharePoint Term Set Lookup - Creates a SharePoint lookup that uses metadata values.
Default Value:
SharePoint Lookup

Lookup Details

Specifies the basic configuration for a lookup.

Figure: Lookup Details screen

Lookup Details screen

Fields

Field NameDefinition

Access Token

Function:
Specifies the access token that connects to your data source.
Accepted Values:
A list of access tokens configured for your environment.
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.

Add New Add New icon

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

Lookup Name

Function:
Specifies the name you want to give to your lookup procedure.
Accepted Values:
One line of text that can have spaces.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Lookup Type

Function:
Specifies the Name/Value type for the lookup procedure.

The Single Select Lookup form control does not support Multiple Columns lookups. If you select the Multiple Columns, the configuration screen shows Name/Value lookup type.

Accepted Values:
Read only.
Default Value:
Name/Value

Configure Lookup > View Fields tab

Configures a lookup to create a view from the available fields, or columns, in a SharePoint list..

Figure: Configure Lookup > View Fields tab

View Fields tab

Fields

Field NameDefinition

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:

Configuration Mode

Function:
Specifies how to configure the WHERE clause for the lookup.
Accepted Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
Default Value:
Quick Configuration

List Name

Function:
Specifies the name of your SharePoint list.
Accepted Values:
  • The name of your SharePoint list.
  • A process data variable.

    You can use Data Model screen to specify a process data variable.

Default Value:
None
Accepts Process Data Variables:
Yes

Name

Function:
The name of an item, such as a property or attribute in a name/value pair.
Accepted Values:
One line of text (a string) with no spaces.
Default Value:
None

Value

Function:
The value for an item, such as the value for a process data variable in a key-value pair.
Accepted Values:
A valid object value.
Default Value:
None

Show All Fields

Function:
Specifies if all the name/value fields show.
Accepted Values:
  • Selected - All the name/value fields show.
  • Deselected - All the name/value fields do not show.
Default Value:
Deselected

Configure Lookup > Where Clause tab

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

Figure: Configure Lookup > Where Clause tab

Where Clause tab

Fields

Field NameDefinition

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:

Configuration Mode

Function:
Specifies how to configure the WHERE clause for the lookup.
Accepted Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
Default Value:
Quick Configuration

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. It is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business use 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, or 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 Lookup > Grouping tab

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

Figure: Configure Lookup > Grouping tab

Grouping tab

Fields

Field NameDefinition

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:

Configuration Mode

Function:
Specifies how to configure the WHERE clause for the lookup.
Accepted Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
Default Value:
Quick Configuration

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

Order 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

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

Configure Lookup > Query Options tab

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

Figure: Configure Lookup > Query Options tab

Query Options tab

Fields

Field NameDefinition

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:

Configuration Mode

Function:
Specifies how to configure the WHERE clause for the lookup.
Accepted Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
Default Value:
Quick Configuration

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

Show Required 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:
Deselected

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

Configure Lookup > CAML Query tab

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

Figure: Configure Lookup > CAML Query tab

CAML Query tab

Fields

Field NameDefinition

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:

Configuration Mode

Function:
Specifies how to configure the WHERE clause for the lookup.
Accepted Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
Default Value:
Quick Configuration

CAML Query - Code Snippet

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

Configure Lookup > Test Query tab

Makes sure the specified CAML query is correct.

Figure: Configure Lookup > Test Query tab

Test Query tab

Fields

Field NameDefinition

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:

Configuration Mode

Function:
Specifies how to configure the WHERE clause for the lookup.
Accepted Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
Default Value:
Quick Configuration

Test 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.

Configure Lookup > Error Messages tab

Configures the message to show if the lookup does not return any data.

Figure: Configure Lookup > Error Messages tab

Error Messages tab

Fields

Field NameDefinition

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:

Configuration Mode

Function:
Specifies how to configure the WHERE clause for the lookup.
Accepted Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
Default Value:
Quick Configuration

No Items Retrieved

Function:
Specifies the error message to show if the lookup does not return any data.
Accepted Values:
One line of text that can have spaces.
Default Value:
None

Lookup Failed

Function:
Specifies the message to show if the data fails to load.
Accepted Values:
More than one line of text.
Default Value:
Failed to load data.