Iterate over all data block records in Oracle forms

I am trying to learn Oracle forms (v6.0). In the trigger with the mouse button pressed, I try to skip all the records from the data block. So far I have the 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 DSP_NAME values ​​are displayed except the last. If I add:

 MESSAGE(:MY_BLOCK.DSP_NAME); 

after the loop, the DSP_NAME value of the last record is displayed. Why is this: a message is displayed until the last record check? and what would be the right way to record records?

+4
source share
2 answers

Your loop is right. I suspect that the last message appears in the status bar at the bottom of the form, and not as a popup.

+5
source

To get a popup, use the same line twice:

 MESSAGE(:MY_BLOCK.DSP_NAME); MESSAGE(:MY_BLOCK.DSP_NAME); 

You will get it that way.

+2
source

All Articles