A script-enabled browser is required for this page to function properly.

Adding Multiple List Elements

To replace the elements in the List item completely, use the POPULATE_LIST Built-in subprogram. This subprogram removes the contents of the current List item and then populates the List item with the values from a record group.

A record group is an internal Oracle Forms data structure that has a column/row framework similar to a database table. One advantage to populating a List item with record group values is that record groups (query and non-query) can be constructed dynamically at runtime.

Note: In order to populate a List item from a record group, the record group must be created at runtime and it must have two columns with type CHAR. Column one must contain List label values and column two must contain List element values.

When you call POPULATE_LIST, you indicate which List item will receive the record group values by specifying List ID and record group name.

Adding multiple List elements Examples

The following example creates a two column query record group and then populates a List item with the values from the record group.

DECLARE
group_id RecordGroup;
List_id Item := Find_Item('List_item1');
status NUMBER;
BEGIN
/*
** Create a two column query record group called
** product_name.
*/
group_id := Create_Group_From_Query('product_names','SELECT
product.name, product.name FROM product');
status := Populate_Group('product_names');
/*
** Populate the List item with the values from the
** product_name record group.
*/
Populate_List(List_id,group_id);
END;


Manipulating List items at runtime

About adding List elements

Adding a single List element