Lookup Functions - m3ter Documentation

Documentation Index

Three Lookup functions are available for use in your Derived Field calculations:

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")

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")

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>, ...])