Home » Developer & Programmer » Forms » populate lov at run time (forms 6i ,xp)
populate lov at run time [message #324984] Wed, 04 June 2008 12:40 Go to next message
hemu
Messages: 16
Registered: May 2007
Junior Member
i have lov
and i want to change the list at run time
first i have populate group new one and after that populate the list but it shows privious one group is populating very well

i have list l1 with record group and i want to chage value in run time
but it's not working
here is the code

DECLARE
RG_ID RECORDGROUP;
V_SEL VARCHAR2(400);
L_N NUMBER;
L ITEM;
RG_NA VARCHAR2(20) :='RG_L1';
N boolean;
BEGIN
L := FIND_ITEM('L1');
V_SEL := 'SELECT ENAME,JOB FROM EMP ORDER BY JOB';
RG_ID := FIND_GROUP(RG_NA);
IF NOT ID_NULL(RG_ID) THEN
DELETE_GROUP(RG_ID);
END IF;
--ABORT_QUERY();
RG_ID := CREATE_GROUP_FROM_QUERY('RG_L1',V_SEL);
L_N := POPULATE_GROUP(RG_ID);
IF L_N = 0 THEN
MESSAGE('ROW IN GROUP '||GET_GROUP_ROW_COUNT(RG_ID));
--CLEAR_LIST('L1');
ELSE
MESSAGE('ERROR IN POPULATING THE GROUP');
RAISE FORM_TRIGGER_FAILURE;
END IF;
--RETRIEVE_LIST('L1','LO1');
--CLEAR_LIST('L1');
POPULATE_LIST('L1','RG_L1');
--N := SHOW_LOV('L1');
END;


please help


thanks in advance
Re: populate lov at run time [message #325228 is a reply to message #324984] Thu, 05 June 2008 05:49 Go to previous messageGo to next message
hemu
Messages: 16
Registered: May 2007
Junior Member
i want to replace record group of lov 'l1'
record group 'lo1' is design time record group

so i want to know there is any way to change record group of lov

in run time .


i have made new record group rg_l1

and add the code
set_lov_property('l1',group_name,'rg_l1');

group is populating but it not showing in lov mean
lov not show on show_lov('l1');

i have done set_lov_property('l1',auto_refresh,property_true);

but there is not any list showing


[Updated on: Thu, 05 June 2008 06:21]

Report message to a moderator

Re: populate lov at run time [message #325532 is a reply to message #325228] Fri, 06 June 2008 09:16 Go to previous message
hemu
Messages: 16
Registered: May 2007
Junior Member
i have solved this by tis way

if any one have any other method to solve this please tell me



on button press


DECLARE
rg_name VARCHAR2(40) := 'LOV8';
rg_id RecordGroup;
gc_id GroupColumn;
errcode NUMBER;
B NUMBER;
A BOOLEAN;
lov_id LOV;
BEGIN
MESSAGE('FIRST RECORD GROUP POPULATE THE LOV');
A:=SHOW_LOV('LOV8');
MESSAGE('SECOND RECORD GROUP POPULATE THE LOV');
MESSAGE('SECOND RECORD GROUP POPULATE THE LOV');
rg_id := Find_Group(rg_name);
IF Id_Null(rg_id) THEN
rg_id := Create_Group(rg_name);
--gc_id := Add_Group_Column(rg_id, 'JOB',CHAR_COLUMN);
--gc_id := Add_Group_Column(rg_id, 'SAL',NUMBER_COLUMN);
END IF;
errcode := Populate_Group_With_Query( rg_id,'SELECT JOB,SAL FROM EMP' );
B := Get_Group_Row_Count( rg_id );

lov_id := Find_LOV('LOV8');
IF Get_LOV_Property(lov_id,GROUP_NAME) = 'LOV8' THEN
Set_LOV_Property(lov_id,GROUP_NAME,RG_ID);
A:=SHOW_LOV('LOV8');
END IF;

END;
Previous Topic: FRM-21011:pl/sql unhandled exception ORA-06502
Next Topic: Blank page(greyed out) displayed when trying to run a LOGON form
Goto Forum:
  


Current Time: Sun Feb 09 05:51:57 CST 2025