Home » Developer & Programmer » Forms » Can not create group (Oracle 10g, Forms6i)
Can not create group [message #412372] Thu, 09 July 2009 00:32 Go to next message
snsiddiqui
Messages: 172
Registered: December 2008
Senior Member
I am creating group at runtime but there are three different columns which I want to concatenate but how...

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_mid_nam'''||'''cu_last_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_mid_nam'''||'''cu_last_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: Can not create group [message #412869 is a reply to message #412372] Mon, 13 July 2009 02:42 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
When posting code please use 'code' tags.

When testing 'select' statements like this, assign it to a variable and display it via a message or alert to 'prove' that you have written it correctly.

Why not use a regular 'record_group' and LOV? Much easier to code and test.

David
Previous Topic: two blocks with same table not in sync
Next Topic: Forms LOGON on opening every form
Goto Forum:
  


Current Time: Fri Sep 20 13:45:24 CDT 2024