dynamic item list 0 element [message #430098] |
Sun, 08 November 2009 05:43 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #432389 is a reply to message #430124] |
Mon, 23 November 2009 22:58 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
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
|
|
|