Lookups

Top  Previous  Next

Lookups are executed via the lookups object and are found in lookups.ini and lookups.custom.ini.  They are implicitly run by job designs, or can be run by any custom code.  Lookup routines are designed to create a tab-separated-values string 'rows$'.  Often they will rely on parameters to limit the amount of data they return.

 

Lookups are also integrated into job designs in custom fields defined as Lookup types.  These fields have an ellipsis button to execute the lookup and display results, allowing a user to select a specific record to obtain a value for the lookup field.

 

Lookups can also have side effects that can be beneficial, such as updating properties in a inbounddoc object, typically provided in a 'doc' variable.  When a doc object is available and has a jobname$ or flowid$ property assigned (which is automatic when run in a job execution context), then that job's parameters are used to pre-create "param.name$" variables for each parameter.

 

Lookups provide four settings:

 

description is a text value that is displayed in job design.
 

parameters is a comma-separated list of parameter names.  When the filter is run, it should be supplied these parameters either as an associative array or in the name structure, as described in the filters object documentation.  When run within an Image Manager design, these parameters are supplied by the designer.
 

cols is a comma-separated list of column names used by the Image Manager when presenting the result of the lookup.  This list should match the content of each tab-delimited row of the lookup result.
 

value is the name of the column that will be pasted by the Image Manager into the lookup field.  When the user selects a row in the lookup list, this column from that row is the value that is used.