Auto-Lookup > SharePoint > SharePoint (CAML) > Name/Value

This topic shows how to create a lookup with SharePoint as the data source and uses a CAML query based on a name/value pair for the Auto-Lookup form control.

Background and Setup

Examples

Good to Know

How to Start

  1. On the Auto-Lookup form control configuration screen, on the Configure tab, click Add Lookup.

    For information about how to open this screen, refer to Auto-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

Description:
Specifies the type of SharePoint lookup to create.
Allowed 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

Good to Know

Fields

Field NameDefinition

Access Token

Description:
Specifies the access token that connects to your data source.
Allowed Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts 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

Description:
Specifies the name you want to give to your lookup procedure.
Allowed Values:
One line of text (a string).

Accepted:

  • Letters
  • Numbers
  • Spaces
Default Value:
None
Accepts Variables:
No
Example:
Refer to:

Lookup Type

Description:
Specifies the type of lookup procedure to do.
Allowed Values:
  • Name/Value - The lookup gets data for specified name/value pairs.
  • Multiple Columns - The lookup gets data for more than one column.
Default Value:
Name/Value
Example:
Refer to:

Configure Lookup > View Fields tab

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

Figure: View Fields tab

View Fields tab

Fields

Field NameDefinition

Site URL

Description:
Specifies the URL for your SharePoint site.
Allowed Values:
A valid SharePoint site URL.
Default Value:
None
Accepts Variables:
Yes
Example:

Configuration Mode

Description:
Specifies how to configure the WHERE clause for the lookup.
Allowed Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
  • Advanced - Lets you manually create a WHERE clause to configure the lookup.

    You can select Advanced if you select Multiple Columns in the Lookup Details screen. When you select Advanced, only the CAML Query, Test Query, and Error Messages tabs are available for configuration.

Default Value:
Quick Configuration

List Name

Description:
Specifies the name of your SharePoint list.
Allowed 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 Variables:
Yes

Name

Description:
The name of an item, such as a property or attribute in a name/value pair.
Allowed Values:
One line of text (a string).

Not Accepted:

  • Spaces
Default Value:
None

Value

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

Show All Fields

Description:
Specifies if all the name/value fields show.
Allowed 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: Where Clause tab

Where Clause tab

Fields

Field NameDefinition

Site URL

Description:
Specifies the URL for your SharePoint site.
Allowed Values:
A valid SharePoint site URL.
Default Value:
None
Accepts Variables:
Yes
Example:

Configuration Mode

Description:
Specifies how to configure the WHERE clause for the lookup.
Allowed Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
  • Advanced - Lets you manually create a WHERE clause to configure the lookup.

    You can select Advanced if you select Multiple Columns in the Lookup Details screen. When you select Advanced, only the CAML Query, Test Query, and Error Messages tabs are available for configuration.

Default Value:
Quick Configuration

Fields

Description:
Specifies the name of the SharePoint column.
Allowed Values:
Read only.
Default Value:
A list of names in the specified list.
Accepts 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

Description:
Specifies the name of the SharePoint column.
Allowed 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 Variables:
No
Example:
Title

Comparer

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

Value

Description:
Specifies the value for the column.
Allowed Values:
A valid column value.
Default Value:
None
Accepts 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: Grouping tab

Grouping tab

Fields

Field NameDefinition

Site URL

Description:
Specifies the URL for your SharePoint site.
Allowed Values:
A valid SharePoint site URL.
Default Value:
None
Accepts Variables:
Yes
Example:

Configuration Mode

Description:
Specifies how to configure the WHERE clause for the lookup.
Allowed Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
  • Advanced - Lets you manually create a WHERE clause to configure the lookup.

    You can select Advanced if you select Multiple Columns in the Lookup Details screen. When you select Advanced, only the CAML Query, Test Query, and Error Messages tabs are available for configuration.

Default Value:
Quick Configuration

Group By - Columns

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

Order By - Columns

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

Sort By

Description:
Specifies the sort order for the result set.
Allowed 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: Query Options tab

Query Options tab

Fields

Field NameDefinition

Site URL

Description:
Specifies the URL for your SharePoint site.
Allowed Values:
A valid SharePoint site URL.
Default Value:
None
Accepts Variables:
Yes
Example:

Configuration Mode

Description:
Specifies how to configure the WHERE clause for the lookup.
Allowed Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
  • Advanced - Lets you manually create a WHERE clause to configure the lookup.

    You can select Advanced if you select Multiple Columns in the Lookup Details screen. When you select Advanced, only the CAML Query, Test Query, and Error Messages tabs are available for configuration.

Default Value:
Quick Configuration

Row Limit

Description:
Specifies the maximum number of rows to get with the CAML query.
Allowed 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

Description:
Specifies that mandatory columns are in the CAML query results.
Allowed 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

Description:
Specifies the location of a folder in which to execute the CAML query.
Allowed 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 Variables:
No

Configure Lookup > CAML Query tab

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

Figure: CAML Query tab

CAML Query tab

Fields

Field NameDefinition

Site URL

Description:
Specifies the URL for your SharePoint site.
Allowed Values:
A valid SharePoint site URL.
Default Value:
None
Accepts Variables:
Yes
Example:

Configuration Mode

Description:
Specifies how to configure the WHERE clause for the lookup.
Allowed Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
  • Advanced - Lets you manually create a WHERE clause to configure the lookup.

    You can select Advanced if you select Multiple Columns in the Lookup Details screen. When you select Advanced, only the CAML Query, Test Query, and Error Messages tabs are available for configuration.

Default Value:
Quick Configuration

CAML Query - Code Snippet

Description:
Shows the code snippet the system creates for the CAML WHERE clause.
Allowed Values:
  • Read Only - If you select Quick Configuration.
  • A valid SQL WHERE clause - If you select Advanced.
Default Value:
None

Configure Lookup > Test Query tab

Makes sure the specified CAML query is correct.

Figure: Test Query tab

Test Query tab

Fields

Field NameDefinition

Site URL

Description:
Specifies the URL for your SharePoint site.
Allowed Values:
A valid SharePoint site URL.
Default Value:
None
Accepts Variables:
Yes
Example:

Configuration Mode

Description:
Specifies how to configure the WHERE clause for the lookup.
Allowed Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
  • Advanced - Lets you manually create a WHERE clause to configure the lookup.

    You can select Advanced if you select Multiple Columns in the Lookup Details screen. When you select Advanced, only the CAML Query, Test Query, and Error Messages tabs are available for configuration.

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

Description:
Specifies the URL for your SharePoint site.
Allowed Values:
A valid SharePoint site URL.
Default Value:
None
Accepts Variables:
Yes
Example:

Configuration Mode

Description:
Specifies how to configure the WHERE clause for the lookup.
Allowed Values:
  • Quick Configuration - Lets you quickly create a WHERE clause to configure the lookup.
  • Advanced - Lets you manually create a WHERE clause to configure the lookup.

    You can select Advanced if you select Multiple Columns in the Lookup Details screen. When you select Advanced, only the CAML Query, Test Query, and Error Messages tabs are available for configuration.

Default Value:
Quick Configuration

No Items Retrieved

Description:
Specifies the error message to show if the lookup does not return any data.
Allowed Values:
One line of text (a string).

Accepted:

  • Letters
  • Numbers
  • Spaces
Default Value:
None

Lookup Failed

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