Loop through all the records of datablock in Oracle forms
forms, oracle
Solution
Your loop is correct. I suspect the last message is showing up in the status bar at the bottom of the form instead of as a popup window.
Problem
I am trying to learn Oracle forms (v6.0). In a when-button-pressed trigger I am trying to loop through all of the records from a datablock. So far I have following code: ``` BEGIN GO_BLOCK('MY_BLOCK'); FIRST_RECORD; LOOP MESSAGE(:MY_BLOCK.DSP_NAME); EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE'; NEXT_RECORD; END LOOP; END; ``` When I run the code all the DSP_NAME values are displayed except the last one. If I add : ``` MESSAGE(:MY_BLOCK.DSP_NAME); ``` after the loop, then the DSP_NAME value of the last record is displayed. Why it is like that - the message is displayed before the last record check? and what would be the right way to loop through the records?