Re: Populating Combo box dynamically

From: Neville Sweet <sweet.neville.nj_at_bhp.com.au>
Date: 1997/10/14
Message-ID: <01bcd867$567d13c0$d33c1286_at_itwol-pc3963.itwol.bhp.com.au>#1/1


Hi,

The doco on Populate_List mentions that the record group must have two columns of type CHAR.
Try 'SELECT DISTINCT FY, FY FROM USER_SCENARIO ORDER BY 1'; (ie. select FY twice and order by the first column).

You need a label and a value for each entry in the list. The label is displayed at runtime.
It seems redundant, but there may be cases where the label and value are different, eg. a description associated with a code.

Good luck.

sbhandar_at_csc.com wrote in article <876517297.23730_at_dejanews.com>...
> I am trying to populate the list item dynamically and this is the
> code I have
>
> DECLARE
> fy_lst_id Item;
> fy_rg_id RecordGroup;
> status Number;
> sel_stmt varchar2(512);
> BEGIN
> fy_lst_id := Find_Item('FY');
> sel_stmt := 'SELECT DISTINCT FY FROM USER_SCENARIO ORDER BY FY';
> fy_rg_id := Create_Group_From_Query('FY_LIST', sel_stmt);
> status := Populate_Group(fy_rg_id);
> Populate_List(fy_lst_id, fy_rg_id);
> END;
>
> But I get this error
> FRM-41334:Invalid record group for list population.
>
> What am I doing wrong? Any hints or suggestions will be very much
> appreciated.
>
> Thank you.
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
>
Received on Tue Oct 14 1997 - 00:00:00 CEST

Original text of this message