Home » Developer & Programmer » Forms » populating a list from a record group
populating a list from a record group [message #81619] Thu, 06 March 2003 08:04 Go to next message
kim
Messages: 116
Registered: December 2001
Senior Member
this should be an easy one, i've looked through the other posts and i still can't figure out what i am doing wrong. i am getting the error FRM-41334, invalid record group for list population. here is my code.

declare
rg_id RecordGroup;
errcode NUMBER;
BEGIN

if id_null(rg_id) then
rg_id := CREATE_GROUP_FROM_QUERY('REC_GRP','select dept_desc from tr_dept order by dept_desc');
errcode := Populate_Group(rg_id);
populate_list('dept',rg_id);
end if;
END;

what am i missing here? thanks ;)
Re: populating a list from a record group [message #81800 is a reply to message #81619] Mon, 24 March 2003 03:39 Go to previous messageGo to next message
utsav
Messages: 94
Registered: March 2003
Member
Hi,

Use the following query

CREATE_GROUP_FROM_QUERY('REC_GRP','select dept_desc,dept_desc from tr_dept order by dept_desc');

Two varchar2 columns are required.

utsav.
Re: populating a list from a record group [message #87357 is a reply to message #81800] Wed, 22 December 2004 02:25 Go to previous message
hudo
Messages: 165
Registered: May 2004
Senior Member
DECLARE

---------LIST -------------
group_id RecordGroup;
list_id Item := Find_Item('CONTROL.THELIST');
status NUMBER;
rg_name varchar2(40) := 'recgroup';

BEGIN

----------------------------- LIST

clear_list(list_id);
group_id := Find_Group(rg_name);
IF NOT id_null(group_id) then
Delete_Group(group_id);
End if;
group_id := Create_Group_From_Query(rg_name,
'SELECT TO_CHAR(EMPNO) ,TO_CHAR(EMPNO) FROM EMP');

status := Populate_Group(rg_name);
Populate_List(list_id, group_id);

END;
Previous Topic: Difference between BATCH and RUNTIME
Next Topic: Re : dynamic
Goto Forum:
  


Current Time: Sun Nov 03 05:08:47 CST 2024