Home » Developer & Programmer » Forms » how to create list item from query (form 4.5)
how to create list item from query [message #415293] Mon, 27 July 2009 02:04 Go to next message
tamil
Messages: 22
Registered: April 2007
Location: chennai
Junior Member
Can any one give me the step by step procedure to create list item from query.

thanks in advance
Re: how to create list item from query [message #415299 is a reply to message #415293] Mon, 27 July 2009 02:46 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Why? Just use 'record_group' via the Forms Builder and associate it with an LOV which is associated with an item.

David
Re: how to create list item from query [message #415301 is a reply to message #415299] Mon, 27 July 2009 03:09 Go to previous messageGo to next message
tamil
Messages: 22
Registered: April 2007
Location: chennai
Junior Member
hi martin

Thanks for your reply
I wanted as a poplist through query
Re: how to create list item from query [message #415306 is a reply to message #415301] Mon, 27 July 2009 03:31 Go to previous messageGo to next message
tamil
Messages: 22
Registered: April 2007
Location: chennai
Junior Member
I have just add a list item named GDN_NAME in the canvas(GODOWN)
and change the list style to poplist.
checked the show view and show canvas in the view menu of the canvas. and created when new form instance trigger as below.

declare
 gd_name varchar2(100):= 'gdname';
 --GDN_NAME item;
 status number;
 groupid recordgroup;
begin

/*groupid := Find_Group('gd_name');

If Not ID_NULL(groupid) Then
Delete_Group(groupid);
End If;*/

groupid := create_group_from_query(gd_name,'select gdn_name,gdn_name from godown_masterx');
	--gdn_name := find_item('block11.groupid');
	status := populate_group('groupid');
	--POPULATE_GROUP_WITH_QUERY('GDN_NAME','groupid');
	populate_list('GDN_NAME','groupid');
end;


i am not able to populate the group. can u help me in this. Is there any modification in the trigger or any changes has to done in the properties window to populate the list.
thanks in advance
Re: how to create list item from query [message #415326 is a reply to message #415293] Mon, 27 July 2009 04:51 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Please Find the Attachment and you will know how to create a list item


Regards


Shahzaib ismail
Re: how to create list item from query [message #415327 is a reply to message #415293] Mon, 27 July 2009 04:52 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
No message
Re: how to create list item from query [message #415346 is a reply to message #415327] Mon, 27 July 2009 05:54 Go to previous messageGo to next message
tamil
Messages: 22
Registered: April 2007
Location: chennai
Junior Member
thanks Shahzaib ismail for the fmb but i have forms 4.5 which is not opening the fmb
Re: how to create list item from query [message #415369 is a reply to message #415327] Mon, 27 July 2009 07:38 Go to previous messageGo to next message
tamil
Messages: 22
Registered: April 2007
Location: chennai
Junior Member
when i compiled and run the forms that u have attached.I happened to get the following error message.

FRM-30351: No list elements defined for list item.
List DNAME

can you please help me.
Re: how to create list item from query [message #415440 is a reply to message #415369] Mon, 27 July 2009 19:09 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search the reference manual and this forum for 'create_group_from_query', there are many examples.

David
Re: how to create list item from query [message #415471 is a reply to message #415293] Tue, 28 July 2009 00:46 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Connect With Scott/tiger


On new_form_instance write this Trigger

Declare
 MDI_Win_Width  Number;
 MDI_Win_Height Number;
 Canvas_width Number;
 Canvas_Height Number;
 v_rg NUMBER;
 v_GrpID RECORDGROUP;
Begin
 	v_GrpID := CREATE_GROUP_FROM_QUERY('deptno', 'SELECT dname, to_char(dname) dname FROM dept ORDER BY 1');
	v_rg := POPULATE_GROUP(v_GrpID);
	
		
 IF v_rg = 0 THEN
 	  	 POPULATE_LIST('emp.dname', v_GrpID);
 END IF;
End;



Regards


Shahzaib ismail
Re: how to create list item from query [message #415502 is a reply to message #415471] Tue, 28 July 2009 02:01 Go to previous message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
shahzaib_4vip@hotmail.com
Connect With Scott/tiger
SELECT dname, to_char(dname) dname FROM dept


SQL> desc dept
 Name                                      Null?    Type
 ----------------------------------------- -------- ---------------
 DEPTNO                                    NOT NULL NUMBER(2)
 DNAME                                              VARCHAR2(14)
 LOC                                                VARCHAR2(13)

SQL>

As DEPT.DNAME already is a character column, why TO_CHAR(DNAME)?
Previous Topic: Can't find menu
Next Topic: send report directly to printer on client side using webutil
Goto Forum:
  


Current Time: Thu Dec 08 04:21:33 CST 2016

Total time taken to generate the page: 0.11971 seconds