Three Lookup functions are available for use in your Derived Field calculations:
Lookup.findNumber
Lookup.findString
Lookup.exists
Lookup.findNumberLookup.findNumber() is a multi-argument function which returns a number value and is of the generalized form:
Lookup.findNumber(<table_code>, <return_field>, <default_value>, <key1>, <key2>, ...)
For example:
Lookup.findNumber("discount_vol_rates", "rate", 1, "country")
This will lookup the number value for the rate field in the published Table Revision of the discount_vol_rates Lookup Table for the country keyed field.
The country keyed field must be present in the measurement.
If no match is found, then a default value of 1 will be used for the rate.
Lookup.findStringLookup.findString() is a multi-argument function which returns a string value and is of the generalized form:
Lookup.findString(<table_code>, <return_field>, <default_value>, <key1>, <key2>, ...)
For example:
Lookup.findString("account_ops_status", "standing", "Pending", "ops_status")
This will lookup the string value for the standing field in the published Table Revision of the account_ops_status Lookup Table for the ops_status keyed field.
The ops_status keyed field must be present in the measurement.
If no match is found, then a default value of Pending will be used for the standing.
Lookup.existsLookup.exists() is a multi-argument function which returns true if found, false if not. It has the generalized form:
Lookup.exists(<table_code>, <key1> [, <key2>, ...])
This Lookup function is typically used in conditional blocks and ternary expressions. For example:
Lookup.exists(<example_table_code>, <examplekey1> [, <examplekey2>, ...])
Login to the Support portal for additional help and to send questions to our Support team.