Drop-down lists are often used in Oracle EBS two development, and drop down lists are generally written down, and can actually be set dynamically using the record group, which is accomplished as follows:
1, first define a record Group
Suppose the test_rec_gp,sql is as follows:
SELECT cr.general_name Lookup_code, cr.medicament_category value from Cux_catalog_53_rules CR
It must be noted that SQL must be two columns, and the type is VARCHAR2, the first column as the displayed column and the second column as the background value. If the columns and values are the same, then use the alias query two times is good, similar
Settings for 2,list
Then you need to be aware that you need to correlate the record group's Drop-down list with at least one value that must be the same as the retrieved value, and the SQL query results in the example below
Then at least one of the Drop-down lists is the same as the query result
3, Trigger code
In the When-new-block-instance trigger of the block where the list is located, write the following code
Declare I number; Begin I: = Populate_group (' test_rec_gp '); If i = 0 then clear_list (' Catalog_rules. Rule_types '); Populate_list (' Catalog_rules. Rule_types ', ' test_rec_gp '); End If; End