|
|
|
Re: how to create list item from query [message #415306 is a reply to message #415301] |
Mon, 27 July 2009 03:31 |
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 #415369 is a reply to message #415327] |
Mon, 27 July 2009 07:38 |
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 #415471 is a reply to message #415293] |
Tue, 28 July 2009 00:46 |
shahzaib_4vip@hotmail.com
Messages: 410 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 |
|
Littlefoot
Messages: 21818 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)?
|
|
|