populate_list [message #396111] |
Sat, 04 April 2009 00:59 |
sivajyothi.kalikiri
Messages: 29 Registered: March 2009
|
Junior Member |
|
|
I had 2 listboxes, list_bank and list_accountno
what's my requoremwnt is i have to populate list_accountno
depending on list_bank. I should get the all the accountno's in list_accountno correspnding to list_bank.
I wrote the following code in when-new-item-instance trigger of list_accountno
DECLARE
v_record_group_name VARCHAR2(50) := 'Rec_Names';
v_record_group_id RECORDGROUP;
v_err_code NUMBER;
v_sql VARCHAR2(1000);
BEGIN
v_sql :=
'SELECT mbm.bank_ac_no
FROM m_bank_mst mbm,m_bank_name mbn
WHERE mbn.bank_code = mbm.bank_code
AND mbn.bank_code =:approval_block.bank_code';
v_record_group_id := find_group( v_record_group_name );
IF id_null( v_record_group_id )
THEN
v_record_group_id := create_group_from_query( v_record_group_name,v_sql);
ELSE
delete_group( v_record_group_id );
v_record_group_id := create_group_from_query( v_record_group_name, v_sql );
END IF;
v_err_code := populate_group( v_record_group_id );
IF v_err_code = 0
THEN
populate_list('APPROVAL_BLOCK.LIST_ACCOUNTNO', v_record_group_id );
END IF;
END;
But i am not getting any values in that list_accountno.
what's wrong in my code?
[Updated on: Sat, 04 April 2009 01:01] Report message to a moderator
|
|
|
|
|
Re: populate_list [message #396136 is a reply to message #396132] |
Sat, 04 April 2009 04:29 |
|
vamsi kasina
Messages: 2112 Registered: October 2003 Location: Cincinnati, OH
|
Senior Member |
|
|
There is some example in this link.
Try to write this code in when-list-changed of the other list item.
If not working try more debug messages.
By
Vamsi
|
|
|