Get Lookup Values (LookupValue Function)

You can use the LookupValue function to retrieve a lookup value from a lookup table. You can specify the LookupValue function in action expressions only. The syntax of the LookupValue function is as follows:
LookupValue ("lookup_table_name", term_or_string)

lookup_table_name

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

term_or_string

a term or character string that specifies the lookup key for the value that you want to retrieve. Enclose character strings in quotation marks.

For example, suppose the term Ctry_Key contains a lookup key. To retrieve the lookup value that is associated with that key from the table Country_Codes, enter the following expression for the Ctry_Key term:
LookupValue('Country_Codes',Ctry_Key)
Image Showing the Example LookupValue(“country_codes”, Ctry_key)
The first few entries in the Country_Codes lookup table are shown below.
Country_Codes lookup table showing lookup key “CA” with lookup value “Canada”
For example, suppose the Ctry_Key column in the current input record contains the value “CA”. The Country_Codes lookup table contains the lookup key “CA”, and the lookup value that corresponds to that key is “Canada”. The expression shown in the display above assigns the value “Canada” to the term Country_Name.
Note: If an expression contains the LookupValue function, then the expression cannot contain anything else.