Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Form 6i: How to put database data into List Item(Combo Box)?
"Arthur" <ycyiu_at_mailcity.com> schrieb im Newsbeitrag
news:8a31a93a.0311251705.7ccf442_at_posting.google.com...
> Hi All,
>
> I want to use a List Item(Combo Box) as a input interface, however,
> how can I put database data into the List Item?
>
> Thank you.
Hi
I have a template that I use all the time:
Make a PU in the Form with the following code:
az Number;
list_id Item;
rg_id RecordGroup;
BEGIN --Populate my Poplist
rg_id := Find_Group('mylist');
If Not ID_NULL(rg_id) Then
Delete_Group(rg_id);
End If;
rg_id := Create_Group_From_Query('mylist',
'Select my_column_list, to_char(id) From my_Table_list '|| 'Where my_Joins_And_Condistions '); --! SQL in '' !
list_id := Find_Item('My_DataBlock.My_Poplist');
az := populate_group(rg_id);
populate_list(list_id, rg_id);
--and eventually
add_list_element(list_id, ...);
--Populate my Second Poplist
... same as above with another group and list item.
END;
Then call this PU in the WHEN-NEW-FORM-INSTANCE-Trigger. That should do it.
For more info invoke the online help by F1.
hth, Jan Received on Wed Nov 26 2003 - 01:35:36 CST