Home » Developer & Programmer » Forms » listbox
listbox [message #165445] Thu, 30 March 2006 03:51 Go to next message
eswaries
Messages: 41
Registered: January 2006
Member
Listbox:
declare
rg_name varchar2(40):='oitem';
status number;
groupid recordgroup;
begin
groupid:=create_group_from_query(rg_name,'select item,item from menu order by item');
status:=populate_group(groupid);
populate_list('oitem',groupid);
go_item(:BILL.OITEM);

end;

shall we create the list with order by like this previous query? Is there any other possibility to do like this?

Error:
When I run the above query error is ,
Frm-41072,cannot create group.
Frm-41076 error populating group

Re: listbox [message #165566 is a reply to message #165445] Thu, 30 March 2006 23:14 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Come on eswari. You've been using this site long enough to know. USE THE CODE TABS and give us ALL the code. This is a snippet!! WHAT'S THE TRIGGER THAT USES THIS CODE??
declare
   rg_name   varchar2 (40) := 'oitem';
   status    number;
   groupid   recordgroup;
begin
   groupid  := create_group_from_query (rg_name, 'select item,item from menu order by item');
   status   := populate_group (groupid);
   populate_list ('oitem', groupid);
   go_item (:BILL.OITEM);
end;
Will you PLEASE read the reference manual and COPY the examples that exist there. You have to test that if a group exists and then delete it if it does exist before you create the group a second time!!

David
Re: listbox [message #165929 is a reply to message #165445] Mon, 03 April 2006 06:47 Go to previous messageGo to next message
RAS_SANKAR
Messages: 42
Registered: March 2006
Location: India
Member
declare
rg_name varchar2(40):='oitem';
status number;
groupid recordgroup;
begin
groupid:=create_group_from_query(rg_name,'select item,item from menu order by item');
status:=populate_group(groupid);
populate_list('oitem',groupid);
go_item(:BILL.OITEM);

end;


u try out this one. it's alredy tested.

DECLARE
errcode NUMBER;
rg_id recordgroup;
BEGIN
rg_id := create_group_from_query('company','select cname,ccode from company order by 1');
errcode := Populate_Group( rg_id );
Populate_List('cname_list',rg_id );
END;


** if item is numeric data type then convenrt into char like to_char(item)
Re: listbox [message #166154 is a reply to message #165929] Tue, 04 April 2006 18:48 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Ras,

My comments concerning 'code' tabs and listing trigger names goes for YOU TOO!!

David
Re: listbox [message #166163 is a reply to message #166154] Tue, 04 April 2006 23:03 Go to previous message
RAS_SANKAR
Messages: 42
Registered: March 2006
Location: India
Member
Ok. David
Previous Topic: how to set the size of MDI in graphic builder
Next Topic: Calendar Problem in Forms
Goto Forum:
  


Current Time: Fri Sep 20 06:39:47 CDT 2024