Retrieves a lookup value from a lookup table.
Restrictions: | You can specify the LOOKUPVALUE function in action expressions only. |
If an expression contains the LOOKUPVALUE function, then the expression cannot contain anything else. | |
Returned data type: | Lookup tables are stored as character data. However, you can assign the results of the LOOKUPVALUE function to a Character, an Integer, a Decimal, a Date, a Datetime, or a Boolean action term. The LOOKUPVALUE function converts the results to match the type of the action term. |
specifies the name of the lookup table that you want to search.
specifies the lookup key for the value that you want to retrieve. Enclose character strings in quotation marks.
CA
,
and the lookup value that corresponds to that key is Canada
.
CA
, you can retrieve the lookup value that is associated with that key from the table
Country_Codes with the following
expression:LOOKUPVALUE('Country_Codes',Ctry_Key)
Canada
to the term Country_Name.