Lookup mappings are used for looking up valid values in the EQuIS database (EDP Professional) or a reference value file (EDP Standalone). Fields with a lookup mapping will be a drop-down list with the valid values from the EQuIS database or reference value file. Lookup mappings are typically used with reference tables (rt_*), but can also be used with data tables (dt_*). Below is an excerpt from an XSD that illustrates a lookup mapping with both a reference table and a data table.
<edd:table mode="lookup" target="rt_sample_type" >
<edd:lookup source="sample_type_code" target="sample_type_code" />
<edd:field source="sample_type_code" target="sample_type_desc" />
<edd:table mode="lookup" target="dt_equipment">
<edd:lookup source="equipment_code" target="equipment_code" />
<edd:field default="SG" target="equipment_type" />
The first line (that targets rt_sample_type) defines which table to look in. The second line defines which column in the EQuIS database table contains the valid values (target=”sample_type_code”) and which field in EDP (source=”sample_type_code”) will display them. The third line is used only when adding a new valid value. The word ‘field’ (in edd:field) declares the mapping to be used only when adding a valid value, whereas the word “lookup” (in edd:lookup) declares the mapping be able to get and add valid values. The attribute source defines what field contains the valid value, and the attribute target defines which column in the table to add the valid value. There can be several field mappings as well as several lookup mappings within a table lookup mapping. All table lookups do not need to contain any field mappings or lookup mappings as shown below.
<edd:table mode="lookup" target="rt_company_type" />
This type of table mapping is used for placing the table into the reference value file reflected in the Reference Values tab of EDP. Adding a table in the reference value file so that the format custom handler can use those values, may be desired. A single line table lookup may also be inserted exclusively for IDEF, which uses the reference value file.
Copyright © 2021 EarthSoft, Inc • Modified: 08 Apr 2020