Page 1 of my app is an interactive grid that displays a "Create Holds" button. Records can be selected and saved on Page 1. Then, when the "Create Holds" button is clicked, page 11 (a modal window) is displayed, prompting for the hold parameters. When the "Create" button is clicked on this modal window, a Dynamic Action executes 3 steps/actions:
- Executes Server Side Code to call a PL/SQL procedure which creates the holds and returns the output_msg parameter which contains the number of records created or updated. That output_msg parameter is returned to GLOBAL_MSG -- an Application Item created in my app.
2. Alert action that displays &GLOBAL_MSG. 3. Close Dialog action
When I run this, the value displayed for GLOBAL_MSG is old.
For example: The first attempt I select 2 records, click "Create Holds" and get an error (the holds are created though).
The second time, I select 3 records, click "Create Holds", and it displays "2 holds created" (the output_msg) from the prior call.
The third time, I select 4 records, click "Create Holds", and it displays "3 holds created"...
I don't understand why step 1 of my Dynamic Action, which has Items to Return set to GLOBAL_MSG, doesn't update that Application Item immediately.
Can anyone tell me how I should be doing this?