Here is how you can loop through all records of a forms block:
declare
currRec integer;
begin
-- go to the desired block
navigate_to_block('BLOCK_NAME');
-- save the current record position
currRec := :system.cursor_record;
first_record();
loop
IF :SYSTEM.LAST_RECORD = 'TRUE' THEN
exit;
ELSE
next_record;
END IF;
end loop;
-- go back to the original record position
go_record (currRec);
end;



