RT_LOOKUP

<< Click to Display Table of Contents >>

Navigation:  Professional > Tables & Views > Reference Value Tables (RT)  >

RT_LOOKUP

The RT_LOOKUP table is used to store lists of values for display in formats, reports, and forms. Some standard EQuIS modules such as Alive, EDGE and SPM use RT_LOOKUP to populate drop-down lists.

 

This table may also be used in custom formats, reports, and forms that look for the RT_LOOKUP.LOOKUP_TYPE (usually hard-coded in).

 

An example of some RT_LOOKUP values that could be used to populate the XYZ column in an ABC custom report parameter drop-down list are shown below.

RT_LOOKUP.LOOKUP_TYPE = "ABC_XYZ", RT_LOOKUP.LOOKUP_CODE = "Item_1"

RT_LOOKUP.LOOKUP_TYPE = "ABC_XYZ", RT_LOOKUP.LOOKUP_CODE = "Item_2"

RT_LOOKUP.LOOKUP_TYPE = "ABC_XYZ", RT_LOOKUP.LOOKUP_CODE = "Item_3"

 

The SQL select statement to populate a drop-down list would then be the following.

 

"Select lookup_code from rt_lookup where lookup_type = 'ABC_XYZ'"

 

The format statements to populate a drop-down list would be the following.

 

<edd:table mode="lookup" target="rt_lookup" filter ="lookup_type='ABC_XYZ'">

       <edd:lookup source="format_column_name" target="lookup_code" />

     </edd:table>

 

The custom code can also be written to display the LOOKUP_DESC field (while still storing LOOKUP_CODE value). Then the RT_LOOKUP table would look like the following.

RT_LOOKUP.LOOKUP_TYPE = "ABC_XYZ", RT_LOOKUP.LOOKUP_CODE = "Item_1", RT_LOOKUP.LOOKUP_DESC = "description one"

RT_LOOKUP.LOOKUP_TYPE = "ABC_XYZ", RT_LOOKUP.LOOKUP_CODE = "Item_2", RT_LOOKUP.LOOKUP_DESC = "description two"

RT_LOOKUP.LOOKUP_TYPE = "ABC_XYZ", RT_LOOKUP.LOOKUP_CODE = "Item_3", RT_LOOKUP.LOOKUP_DESC = "description three"