Auto-Lookup > Salesforce > Salesforce (SOQL) > Multiple Columns

This topic shows how to create a lookup with Salesforce as the data source and uses a SOQL query based on multiple columns for the Auto-Lookup form control.

Background and Setup

Video: Build a Custom Search Screen

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

    Select Salesforce
  3. Click Next.

Salesforce Type

Specifies the type of Salesforce lookup.

Figure: Salesforce Type screen

Salesforce Type screen

Good to Know

Fields

Field NameDefinition

Salesforce Type

Description:
Specifies the type of lookup to create.
Allowed Values:
  • Salesforce Lookup - Creates a Salesforce lookup with a SOQL query.
  • Salesforce Translation Workbench Lookup - Creates a lookup that uses Translation Workbench to specify languages you want to translate.
Default Value:
Salesforce 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 Salesforce.
Function of this Screen:
Configure an access token to connect to Salesforce.
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 > Quick Config tab

Configures a lookup with more than one column from your data source.

Figure: Configure Lookup > Quick Config tab

Quick Config tab

Fields

Field NameDefinition

Entity

Description:
Specifies the name for your entity.
Allowed Values:
The name of your entity.
Default Value:
None
Example:
Refer to:

Select Column - Name

Description:
Specifies the column names for the selected entity.
To Open this Field:
  1. On the Configure Lookup screen, in the Request tab, select the name of the method from the Service Operation list
  2. On the Select All field, click Expand Expand icon.
Allowed Values:
Read only.

The values are completed when you select the entity name.

Select Column - Value

Description:
Specifies the value to update for the column.
To Open this Field:
  1. On the Configure Lookup screen, in the Request tab, select the name of the method from the Service Operation list
  2. On the Select All field, click Expand Expand icon.
Allowed Values:
None.

But when you add a column in the list, the value field is populated with the column's name. Set the actual value.

Expand Expand icon

Function:
Shows the field list options.

Collapse Collapse icon

Function:
Closes the field list.

Column Name

Description:
Specifies the name of the entity column.
To Open this Field:
  1. Click Add Filter Add Filter icon
Allowed Values:
A valid entity column name.
Default Value:
None

Operator

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

The Is Null and Is Not Null options are available in these releases:

Select Nest Type

Description:
Specifies the AND and OR logical operators to filter the lookup.
To Open this Field:
  1. Click Add Filter Add Filter icon
Allowed Values:
  • AND - Specifies the AND operator.
  • OR - Specifies the OR operator.
Default Value:
And

Delete Filter Delete Filter icon

Function:
Deletes the filter condition.

Filter Condition - Sort By

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

Filter Condition - Sort Order

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

Description:
Specifies the WHERE clause for your query with the conditions and logical operators.
Allowed Values:
A valid SQL WHERE clause.
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}

Validate Query

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

Configure Columns

Opens this Screen:
Configure Lookup > Configure Columns
Function:
Configures a data type for more than one column to show in your lookup.
Limitations:

This field is available in these releases:

Configure Lookup > Configure Columns

Configures a data type for more than one column to show in your lookup.

Figure: Configure Lookup > Configure Columns

Configure Columns

Prerequisites

Fields

Field NameDefinition

Display Name

Description:
Specifies the name for the column that shows in your lookup.
Allowed Values:
One line of text (a string).

Accepted:

  • Letters
  • Numbers
  • Spaces
Default Value:
Different for different columns

Data Type

Description:
Specifies the data type for the column.
Allowed Values:
A data type from the list.
Default Value:
None

Format

Description:
Specifies the date format that the column shows.
To Open this Field:
  1. In the Data Type field, select Date.
Allowed Values:
  • MM/dd/yyyy - Shows the date in the format Month/day/year.
  • yyyy/MM/dd - Shows the date in the format year/Month/day.
  • yyyy-MM-dd - Shows the date in the format year-Month-day.
  • dd-MM-yyyy - Shows the date in the format day-Month-year.
  • dd MMM yyyy - Shows the date in the format day Month year.
  • MMM dd yyyy - Shows the date in the format Month day year.
Default Value:
None
Example:
  • 09/21/1978
  • 1978/09/21

Format

Description:
Specifies the date-time format that the column shows.
To Open this Field:
  1. In the Data Type field, select DateTime.
Allowed Values:
  • MM/dd/yyyy - Shows the date in the format Month/day/year.
  • MM/dd/yyyy HH:mm:ss - Shows the date-time in the format Month/day/year hour:minute:second.
  • yyyy/MM/dd - Shows the date in the format year/Month/day.
  • yyyy-MM-dd HH:mm:ss - Shows the date-time in the format year-Month-day hour:minute:second.
  • yyyy-MM-dd - Shows the date in the format year-Month-day.
  • dd-MM-yyyy - Shows the date in the format day-Month-year.
  • dd-MM-yyyy HH:mm:ss - Shows the date-time in the format day-Month-year hour:minute:second.
  • dd MMM yyyy - Shows the date in the format day Month year.
  • dd MMM yyyy HH:mm:ss - Shows the date-time in the format day Month year hour:minute:second.
  • MMM dd yyyy - Shows the date in the format Month day year.
  • MMM dd yyyy HH:mm:ss - Shows the date-time in the format Month day year hour:minute:second.
Default Value:
None
Example:
  • 09/21/1978 18:35:50

Collapse All

Description:
Specifies whether to close the Display Name and Data Type fields for all columns on the screen.
Allowed Values:
  • On - Closes the Display Name and Data Type fields for all columns.
  • Off - By default, the Display Name and Data Type fields stay open for all columns.
Default Value:
Deselected

Reset

Description:
Restores the default display name and data type for the column.

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

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.