Mapping Types - Lookup Mappings

<< Click to Display Table of Contents >>

Navigation:  EDP > Customizability >

Mapping Types - Lookup Mappings

Lookup mappings are used for looking up valid values in the EQuIS database (Professional EDP) 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 EQuIS Format Definition (EFD) file 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 in which table to look. 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.