Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Populating a ComboBox.
Try something like this :
/* groep DE_KLANT.PROD_ID */
group_id := Find_Group('de_klant_produktF'); /* give the group just a name */
IF NOT Id_Null(group_id)
THEN
Delete_Group(group_id);
END IF;
group_id := Create_Group_From_Query('de_klant_produktF',
'SELECT prod_naam_fra, to_char(prod_id) from de_produkten order by
prod_naam_fra');
status := Populate_Group('de_klant_produktF');
list_id := Find_Item('null.prod_id');
Clear_List(list_id);
Populate_List(list_id,group_id);
At runtime, you sometimes have to "re-create" the record group, so you have to
delete it first.
(This code works, i used it for myself)
Luc
Courtney Wright wrote:
> I'm using Developer/2000 Forms Designer 4.5. I am trying to populate a
> combobox with all of the records in a particular column. To do this, I
> understand that I have to create a group at run-time, populate it, and then
> populate the list with the group I made.
>
> DECLARE
>
> RG_Name varchar2(10) := 'WOList';
> RG_ID RecordGroup;
> ErrNo Number;
>
> BEGIN
>
> RG_ID := Create_Group_From_Query(RG_Name, 'SELECT WONumber FROM
> Work_Order');
> ErrNo := Populate_Group(RG_ID);
>
> Populate_List('WONumber', RG_ID);
>
> End;
>
> Notes:
> WONumber is the name of the combobox on the form. It's also the name of the
> column in the table.
> The WONumber column in the table is varchar2(10).
> This code is in a button using the When_Button_Pressed Trigger.
>
> Here is the code I have so far. It compiles fine but when I try to use it
> at run-time, I get an error that says it can't create the group. Any ideas
> on what I'm doing wrong?
>
> Courtney
Received on Thu Jul 22 1999 - 09:35:39 CDT
![]() |
![]() |