POPULATE LIST ITEMS FROM LIST ITEM VALUE [message #146999] |
Tue, 15 November 2005 03:47 |
aarontan78
Messages: 63 Registered: August 2005
|
Member |
|
|
Hi all,
I have a form which has 2 list items.
The first list item is populated from a table.
I would like to populate the second list item from the value I selected from the first list item.
Can someone please provide me with step by steps on how to do this?
Thanks in advance!
Regards,
Aaron
|
|
|
|
Re: POPULATE LIST ITEMS FROM LIST ITEM VALUE [message #147007 is a reply to message #147001] |
Tue, 15 November 2005 04:10 |
aarontan78
Messages: 63 Registered: August 2005
|
Member |
|
|
Hi,
Thanks for the prompt reply. May I know where should I put these code? and where should i put my second populated record group code? and what is list_id?
If possible, can you show me the codes for doing this?
Basically this is my second populated record group code but it's not working..I need to have the value from the selected first list item to put into my second list item (record group) where clause.
DECLARE
group_2 RecordGroup;
list_2 Item := Find_Item('TABLE_2.FLD');
status1 NUMBER;
v_query varchar(1);
BEGIN
group_2 := Create_Group_From_Query('FLD','SELECT FLD,FLD FROM TABLE_2 WHERE ID = :TABLE_1.ID');
Clear_List(list_2);
status1 := Populate_Group('FLD');
Populate_List(list_2,group_2);
END;
Regards...
[Updated on: Tue, 15 November 2005 20:36] by Moderator Report message to a moderator
|
|
|
Re: POPULATE LIST ITEMS FROM LIST ITEM VALUE [message #147021 is a reply to message #146999] |
Tue, 15 November 2005 05:33 |
ashishmate
Messages: 90 Registered: February 2005 Location: Mumbai
|
Member |
|
|
hi
put this code in when validate item of your first list item or when new item instance of your second list
list id is name of list declare
rg_id RecordGroup;
n varchar2(10) := 'rg1';
gc_id GroupColumn;
begin
rg_id := Find_Group( 'rg1' );
IF NOT Id_Null(rg_id) THEN
Delete_Group( rg_id );
END IF;
rg_id := Create_Group(n);
gc_id := Add_Group_Column('rg1', 'col1',CHAR_COLUMN,50 );
gc_id := Add_Group_Column('rg1', 'col2',CHAR_COLUMN,50 );
Retrieve_List('block.list', 'rg1');
Clear_List('list'); -- if you want to clear first list
Populate_List('block.list1', 'rg1');
end;
[Updated on: Tue, 15 November 2005 20:33] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|