populate multiple rows from a table to a multi record block [message #385887] |
Wed, 11 February 2009 13:27 |
vinodkumarn
Messages: 60 Registered: March 2005
|
Member |
|
|
I have block A and B with multi record
I enter a value in column1 in block A, then system should query another table based on the entered value, fetch the multiple rows and populate into block B
I have written the below procedure and called in the when validate item trigger for column1 in block A
problem with this is i am able to populate only 1st row into block B, but i have totally 3 rows, 2nd and 3rd records are not populated
can somebody let me know what is the problem
PROCEDURE POPULATE_ROWS IS
cursor c1 is
select code,name,value1,value2
from lookup
where sub_code = :blockA.column1;
BEGIN
go_block('blockB');
for i in c1 loop
:blockB.code := i.code;
:blockB.name := i.name;
:blockB.value1 := i.value1;
:blockB.value2 := i.value2;
exit when c1%notfound;
next_record;
end loop;
END;
|
|
|
|
Re: populate multiple rows from a table to a multi record block [message #385894 is a reply to message #385890] |
Wed, 11 February 2009 14:32 |
vinodkumarn
Messages: 60 Registered: March 2005
|
Member |
|
|
block A and block B are having master-detail relation
block A is based on table A and block B on table B
and i am trying to default with rows in block B from table lookup
I have removed the exit when c1%notfound line,still result is same
There are really records, bcos when i run the cursor select statement i get 3 records fetched
|
|
|
|
|
|