Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Programmatic Record Groups
In article <1998041510255076740_at_zetnet.co.uk>,
Bernadette <b.pinto_at_zetnet.co.uk> wrote:
>
> If I create a record group programatically, how do I attach an LOV to
> it? (I..e, how do I get the LOV to display the columns I want and to
> populate the item I want from those columns displayed?).
>
> Thanks
>
> B. Pinto
>
>
I used the code below to create group from SQL statement.
The Set_LOV_Property(lov_id,GROUP_NAME,rg_id);
attaches an existing LOV to the new group.
However for this to work. I have to create a LOV and
attach it to a dummy Record_Group.
In effect I need a seperate LOV for each SQL lookup as
I could'nt find a way of setting LOV's columns
programatically.
Therefor this saves me from manually creating record_groups
but I still need to manually create LOV's.
I would like to programatically create LOV but am not sure how to do this as I am new to Forms.
Regards
Fintan Sheehan
PROCEDURE CREATE_LOOKUP_GROUP
(v_sql in varchar2,v_lov_name in varchar2)
IS
rg_name varchar2(40) := 'RG_LOOKUP';
rg_id RecordGroup;
errcode number;
v_sql2 varchar2(200);
lov_id Lov;
BEGIN lov_id := Find_Lov(v_lov_name);
rg_id := Find_Group( rg_name );
rg_id := Create_Group_From_Query(rg_name,v_sql);
errcode := Populate_Group( rg_id );
if errcode != 0
then
message('Error populating group'); else
Set_LOV_Property(lov_id,GROUP_NAME,rg_id);
end if;
END CREATE_LOOKUP_GROUP; -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Tue Apr 28 1998 - 11:11:28 CDT