Hi
Is there any any example of WHILE LOOP in Forms or in Reports?
Thanx.
Printable View
Hi
Is there any any example of WHILE LOOP in Forms or in Reports?
Thanx.
what are you trying to use the loop for? you can use loops in report triggers i imagine. i have never worked with forms so i don't know about them.
Mahomad..
you can you a block level trigger that fires for each row of data is being queried. post-query trigger on the block.
Can you explain what your attempting to accomplish, so we might be able to help you better.
Sure.
For example, let's suppose that you wish to display two blocks: a master block and detail block. Upon some event such as the user clicking a button, you want to update all the child records related to the current master. You should never do this via an UPDATE statement. Instead, create a loop and step through each record IN THE FORM which is to be updated:
go_block('DETAILBLOCK');
first_record;
loop
---:detailblock.myfield := somenewvalue;
---exit when :SYSTEM.LAST_RECORD = 'TRUE';
---next_record;
end loop;