Create poplist dynamically in form

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.