Skip to main content

LookUp

LookUp Function

Looks up the specified value in the key column and returns the corresponding value.

Syntax

Lookup(table Table, scalar|vector lookupColumnKey, scalar lookupColumnValue, scalar|vector defaultValue, vector lookupValue1, vector lookupValue2,..)

Arguments

ArgumentDescription
table TableLookup table
`scalarvector lookupColumnKey`
scalar lookupColumnValueValue column from the lookup table
`scalarvector defaultValue`
vector LookupValue(s)Key columns from the input table

Examples:

Lookup([[FusionTestTable2]], "VarcharColumn", "PhoneNumCol", "", [FusionTestTable.VarcharColumn])

Looks up the VarcharColumn from the FusionTestTable with the VarcharColumn of FusionTestTable2 and returns the corresponding value of the PhoneNumCol and returns "" when the value is not found.

Lookup([[FusionTestTable2]],array("VarcharColumn","SmallIntColumn"), "PhoneNumCol", "", [FusionTestTable.VarcharColumn],[FusionTestTable.SmallIntColumn])

Looks up the VarcharColumn and the SmallIntColumn from the FusionTestTable with the VarcharColumn and SmallIntColumn of FusionTestTable2 and returns the corresponding value of the PhoneNumCol and returns "" when the value is not found.