Home » Developer & Programmer » Forms » dynamic populate drop down list (FORM Builder 9i)
dynamic populate drop down list [message #376242] Tue, 16 December 2008 10:11 Go to next message
mindy
Messages: 4
Registered: December 2008
Junior Member
Hi,experts,

I have a multiple data block that has a drop down list.
The list must be populated dynamically according to the other item of the same record.
So in WHEN_NEW_RECORD_INSTANCE, I has the code as
IF <condition 1> THEN
P_ENABLE_DISABLE_ITEM('MLB_TEST.TXT_REASON',CURRENT_RECORD,'T');
SET_RECORD_PROPERTY(:SYSTEM.CURSOR_RECORD,'MLB_MEMBER_DETAILS',STATUS,NEW_STATUS);
CLEAR_LIST('MLB_TEST.TXT_REASON');
ADD_LIST_ELEMENT ('MLB_TEST.TXT_REASON', 1, C,C);
ADD_LIST_ELEMENT ('MLB_TEST.TXT_REASON', 1, D,D);
SET_RECORD_PROPERTY(:SYSTEM.CURSOR_RECORD,'MLB_TEST',STATUS,QUERY_STATUS);
ELSE
P_ENABLE_DISABLE_ITEM('MLB_TEST.TXT_REASON',CURRENT_RECORD,'T');
SET_RECORD_PROPERTY(:SYSTEM.CURSOR_RECORD,'MLB_TEST',STATUS,NEW_STATUS);
CLEAR_LIST('MLB_TEST.TXT_REASON');
ADD_LIST_ELEMENT ('MLB_TEST.TXT_REASON', 1, E,E);
ADD_LIST_ELEMENT ('MLB_TEST.TXT_REASON', 1, F,F);
SET_RECORD_PROPERTY(:SYSTEM.CURSOR_RECORD,'MLB_TEST',STATUS,QUERY_STATUS);


The reason list of the first record in the block is showing C,D. but the reason list of the second record in the block is showing E,F,C,D.
How I can achieve the result that the reason list of the first record in the block is showing C,D and the reason list of the second record in the block is showing E,F.


Thanks
Re: dynamic populate drop down list [message #376302 is a reply to message #376242] Tue, 16 December 2008 20:47 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Mindy,

Please read the guidelines for this site. Use the 'code' tags available via the '{::}' icon just above the 'text' window.

I suggest using a 'where' clause in the Record Group that you for your LOV. This 'where' clause would contain the ':blk.itm' of your block with appropriate 'NVL' so that if it is NULL then all records are retrieved.

David
Re: dynamic populate drop down list [message #376557 is a reply to message #376302] Wed, 17 December 2008 17:57 Go to previous messageGo to next message
mindy
Messages: 4
Registered: December 2008
Junior Member
I am a beginner. Can you give more details on how to create LOV and record group and attached it to a drop down list. And the can the query that associates with the record group accepts paramters?
Re: dynamic populate drop down list [message #379543 is a reply to message #376557] Wed, 07 January 2009 00:21 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Did you solve your problem?

David
Previous Topic: connection problem
Next Topic: Erroor
Goto Forum:
  


Current Time: Wed Dec 07 20:49:50 CST 2016

Total time taken to generate the page: 0.16601 seconds