Auto-Lookup > Database > Name/Value

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

Background and Setup

Good to Know

  • There is more than one path to configure a lookup. Make sure you use the document that shows the path for your lookup.
  • 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?

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

    Select Database
  3. Click Next.

Lookup Details

Specifies the basic configuration for a lookup.

Figure: Lookup Details screen

Lookup Details screen

Good to Know

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

Add New Add New icon

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

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 type of lookup procedure to do.
Accepted 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 > Quick Config tab

Configures a lookup with the existing data format from your data source.

Figure: Configure Lookup > Quick Config tab

Quick Config tab

Fields

Field NameDefinition

Schema

Function:
Specifies your database schema.
Accepted Values:
A schema name from the list.

When you select a database, the schemas associated with the database show in this field.

Default Value:
None

Table

Function:
Specifies the name of the your database table.
Accepted Values:
The name of your table.

When you select a schema, the tables associated with the database show in this field.

Default Value:
None

Columns - Name

Function:
Specifies the column name of the database table in a key-value pair.
To Open this Field:
  1. Select a table from the Table list.
Accepted Values:
A column name from the list.

When you select a database table, the columns and its values associated with the database table show in this field.

Default Value:
None

Columns - Value

Function:
Specifies the value for a database column in a key-value pair.
To Open this Field:
  1. Select a table from the Table list.
Accepted Values:
A column value from the list.

When you select a database table, the columns and its values associated with the database table show in this field.

Default Value:
None

Column Name

Function:
Specifies the name of the database column.
To Open this Field:
  1. Click Add Filter Add Filter icon
Accepted Values:
A valid database column name.
Default Value:
None

Operator

Function:
Specifies the operator to use in the filter.
To Open this Field:
  1. Click Add Filter Add Filter icon
Accepted Values:
  • =
  • !=
  • >
  • <
  • In
  • Is Null
  • Is Not Null
Default Value:
=
Limitations:

Filter Condition - Value

Function:
Specifies one or more values for the column or process data variables that contains the column value.
To Open this Field:
  1. Click Add Filter Add Filter icon
Accepted Values:
One or more column values.
Default Value:
None
Accepts Process Data Variables:
Yes
Limitations:

The option to use more than one value is available in these releases:

Delete Filter Delete Filter icon

Function:
Deletes the filter condition.

Filter Condition - Sort By

Function:
Specifies the name of the column to sequence the query results.
Accepted Values:
The name of your list column.
Default Value:
None

Filter Condition - Sort Order

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

Configure Lookup > Advanced tab

Configures a WHERE clause for your query.

Figure: Configure Lookup > Advanced tab

Advanced tab

Fields

Field NameDefinition

Query

Function:
Specifies the WHERE clause for your query with the conditions and logical operators
Accepted Values:
  • A valid SQL WHERE clause.
  • A valid stored procedure.
  • A valid SQL view.
Default Value:
None
Example:
  • SELECT [Account Owner] "Name", [Account Number] "Value" FROM Account
  • SELECT PositionCode, FirstName, LastName, Email, City, StateCode, ZipCode FROM [appApplicants] WHERE PositionCode = ${PositionCode}

Perform SQL Query Escaping

Function:
Specifies whether the query condition value escapes the apostrophe (') character.
Accepted Values:
  • Selected - Apostrophe (') characters are escaped in your query condition value.
  • Deselected - The query condition value does not escape apostrophe (') characters.
Default Value:
Selected
Example:
  • SELECT [Account Owner] "Name", [Account Number] "Value" FROM Account
  • SELECT PositionCode, FirstName, LastName, Email, City, StateCode, ZipCode FROM [appApplicants] WHERE PositionCode = ${PositionCode}
Limitations:

Validate Query

Function:
Does a test to make sure the query is correct, and displays the error message if an error occurs.

Result

Function:
Shows the result of the WHERE clause query.

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

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.