The purpose of a lookup table is to return a set of one or more output parameter values in response to the receipt of a set of one or more input parameter values. It is possible to achieve this kind of behaviour by other means (a database table, for example) but typically only if the set of input parameters is small and the domain of each parameter is likewise small. Consider using lookup tables if any of the following apply:
-
you have multiple input parameter values to evaluate;
-
the domain of any one input parameter value is large;
-
you would like to use range-based tests or tests other than "equals";
-
there are many combinations of input parameter values that return the same set of output parameter values;
-
you need to test, interactively, that the expected set of output parameter values is being returned for a given set of input parameter values;
-
you wish to reduce the likelihood of errors in your data definitions;
-
your lookup data is likely to be modified, even occasionally.
Lookup tables are ideal for facilitating dictionary-style lookups (in which you supply a key datum and receive a value in return). They can be used to perform binary searches on a set of sorted data. They also support complex lookup scenarios involving multiple input parameter values and hierarchical tests. They are particularly advantageous in scenarios where it is acceptable for one or more input parameter values to be omitted. Once a lookup table has been created, it may be harnessed by a
Lookup feature for use in a
project.
The Lookup Table Editor is shown by selecting View → Lookup Table Editor from the menu bar.