LOOKUP Function

Determines whether a lookup key exists in a lookup table. Specify the LOOKUP function as the expression for the term whose value contains the lookup key that you want to search for.

Restrictions: You can specify the LOOKUP function in condition expressions only.
If an expression contains the LOOKUP function, then the expression cannot contain anything else.
Returned data type: Boolean

Syntax

LOOKUP ('lookup_table_name')

Required Argument

lookup_table_name

specifies the name of the lookup table that you want to search.

Example

Suppose you have a Country_Codes lookup table that uses two-letter abbreviations for countries as the lookup key and country names as the lookup values.
Country_Codes lookup table showing lookup key CA with lookup value Canada
To verify that the value of the term Ctry_Key exists as a lookup key in the table Country_Codes, enter the LOOKUP function as the expression for the Ctry_Key term. For example, if the Ctry_Key column in the current input record contains the value CA, then the following expression evaluates to True.
Expression Lookup('Country_Codes') for condition term Ctry_Key
Last updated: February 22, 2017