Lookup.findNumberLookup.findStringLookup.exists
Lookup.findNumber
Lookup.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
ratefield in the published Table Revision of thediscount_vol_ratesLookup Table for thecountrykeyed field. - The
countrykeyed 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.findString
Lookup.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
standingfield in the published Table Revision of theaccount_ops_statusLookup Table for theops_statuskeyed field. - The
ops_statuskeyed 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.exists
Lookup.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>, ...])