Home » Developer & Programmer » Forms » List Item Population (Oracle 10g, Forms6i)
List Item Population [message #411814] Tue, 07 July 2009 00:04 Go to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
Dear all

I have two list items, list_item1 and list_item2. I am creating and populating list_item2 at when_list_changed trigger of list_item1 but it is not working and give me error CAN NOT POPULATE THE LIST


declare
rg_id recordgroup;
rg_name varchar2(40) := 'MY_LIST';
rn number;
begin
rg_id := find_group( rg_name );
if id_null(rg_id) then
rg_id := create_group_from_query(rg_name,'select cu_frst_nam, cu_usrid ' ||'from comm_users '
||'where cu_cd_dcode = ||:trm_t_cd_dcode
||'order by 1');
else
delete_group(rg_id);
rg_id := create_group_from_query(rg_name,'select cu_frst_nam, cu_usrid ' ||'from comm_users '
||'where cu_cd_dcode = '||:trm_t_cd_dcode
||'order by 1');
end if;
rn := populate_group(rg_id);
populate_list('trm_on_request',rg_id);
end;
Re: List Item Population [message #411838 is a reply to message #411814] Tue, 07 July 2009 02:21 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
rg_id := create_group_from_query(rg_name,'select cu_frst_nam, cu_usrid '	 ||'from comm_users '
||'where cu_cd_dcode = ||:trm_t_cd_dcode
||'order by 1');
1. Add to_char to cu_usrid.
2. Add a space before order by.
3. Next time, provide the exact error.

By
Vamsi
Re: List Item Population [message #411878 is a reply to message #411838] Tue, 07 July 2009 04:09 Go to previous messageGo to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
Dear VAMSI thanks for the reply.

usrid field is already varchar2 and after adding of space, problem not resolved.

Exact error is

FRM-41337: Cannot populate the list from recordgroup.
Re: List Item Population [message #411888 is a reply to message #411878] Tue, 07 July 2009 04:28 Go to previous message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Try to add message(...) where ever you can and debug the code.
Still issues? Post your new code.

By
Vamsi
Previous Topic: Find Record with Default Where
Next Topic: cursor Example
Goto Forum:
  


Current Time: Fri Sep 20 04:21:32 CDT 2024