Skip to content
Martin Danielsson edited this page Jul 23, 2015 · 2 revisions

Checks whether a lookup key is present in a lookup map with the given name. Returns a bool.

What Type
Syntax HasKey(lookupName, key)
lookupName string
key string
Return type bool

Example: If(HasKey("Status", $StatusId), Status($StatusId, $StatusText), "missing lookup")

Checks whether the "Status" lookup map has an entry for the content of the field StatusId. If it has, it returns this lookup, otherwise returns a string literal "missing lookup".

Please note that the lookup would cause an error if doesn't find the key in the lookup map, unless the noFailOnMiss attribute of the LookupMap definition is set.

Clone this wiki locally