Determines if a unique attribute value is contained in the specific entity
(data source).
Returns TRUE if there is one occurrence of the value in the attribute.
Returns FALSE if the value is not in the attribute or if there are multiple
occurrences of the value.
Note: The function is run against all rows in an attribute; rows with matching
values return TRUE and rows that do not contain those values or have
multiple occurrences of the value return FALSE.
Note the following guidelines:
- The specified entity must be a fully-loaded, real entity (not dynamic).
- Analyze the entity before running this function.
- Not supported for Quality processes; when used in Quality, the function
returns a dash (-).
- Syntax
-
LOOKUP(attribute, entity_name/entity_ID,
attribute_id)
where
-
attribute is the attribute that you want to look up.
-
entity_name/entity_ID is the name or ID of the entity
which contains the attribute to be looked up.
Note: If you use entity name rather than entity ID, and there are
multiple entities with the same name, the function returns results
for the entity with the highest (most recent) ID value. For
example, if there are three entities with ID values of 1, 2, and 8,
the results will reflect entity 8.
-
attribute_id is the unique ID for the attribute against
which to run the look up.
Note: Attribute names can also be used, but to avoid problems with
ambiguous, duplicate, or misspelled names, it is recommended that
you use ID values only.
- Example
-
- LOOKUP(01803, "Boston Data", 7) returns True if the postcode
value of 01803 is contained in the attribute 7.
- In the example LOOKUP(prod_id, 8, 1) attribute prod_id contains
ID numbers 01, 02, and 03. Attribute 1 contains ID numbers 01,
02, and 03 so those rows will return TRUE. But attribute 1 also
contains IDs 04, 05, and 06, and since these IDs are not found
in prod_id, these rows will return FALSE.
|