Home » Developer & Programmer » Forms » dynamic item list 0 element
dynamic item list 0 element [message #430098] Sun, 08 November 2009 05:43 Go to next message
imuharram
Messages: 48
Registered: January 2009
Member
I have a non-database list item
properties: elements in list:0,0
i have the following code in when-new-form-instance to populate values to that list

DECLARE
R1_ID RECORDGROUP;
N NUMBER;
BEGIN
R1_ID:=CREATE_GROUP_FROM_QUERY('Q_1','SELECT CELL_NAME, TO_CHAR(CELL_ID) FROM CELL WHERE SITE_NO=:SITE.SITE_NO');
N:=POPULATE_GROUP('Q_1');
POPULATE_LIST('TRX2.CELL_NAME','Q_1');
END;


at run time, when i access list item, i only find the value 0
whereas if i remove "where" it works and it populates all cell_ids in that table

DECLARE
R1_ID RECORDGROUP;
N NUMBER;
BEGIN
R1_ID:=CREATE_GROUP_FROM_QUERY('Q_1','SELECT CELL_NAME, TO_CHAR(CELL_ID) FROM CELL');
N:=POPULATE_GROUP('Q_1');
POPULATE_LIST('TRX2.CELL_NAME','Q_1');
END;


I can't know why this is happening
Re: dynamic item list 0 element [message #430122 is a reply to message #430098] Sun, 08 November 2009 22:26 Go to previous messageGo to next message
Chirag.Bhatt
Messages: 3
Registered: November 2009
Junior Member
Dear imuharram,

At when-new-form-instance what value is held in :SITE.SITE_NO. If it is null then "SELECT CELL_NAME, TO_CHAR(CELL_ID) FROM CELL WHERE SITE_NO=:SITE.SITE_NO" wll not return any rows n you will find only the value 0 in list
Re: dynamic item list 0 element [message #430124 is a reply to message #430122] Sun, 08 November 2009 23:30 Go to previous messageGo to next message
imuharram
Messages: 48
Registered: January 2009
Member
no, it's not null
it has a value not null neither 0
and when i perform the SQL statement in SQL*Plus with the value :site.site_no is assigned it fetches data
Re: dynamic item list 0 element [message #432389 is a reply to message #430124] Mon, 23 November 2009 22:58 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I wish you people would stop using dynamic 'record_groups', they suck. Just create the record_group in the Forms Builder, then an LOV, and associate the LOV with the item in question. It will then work.

David
Previous Topic: change direction problem
Next Topic: Form 6i: Is character mode full screen menu possible?
Goto Forum:
  


Current Time: Fri Sep 20 09:52:23 CDT 2024