A tale of two layouts from a floating window
From a layout, a script does a new window, then goes to an intermediate layout, and then does a loop/end loop indefintely. The intermediate layout has two buttons, one to commit records, the other not. Then it does a halt script to close the new window.
This is fine for one situation in this database, but in another I'd like to to have two alternatives in the floating window:
1. The user clicks cancel and the script ends as it does now with a "halt script" and the new window disappears.
2. The user clicks ok, the script commits the records and then somehow the new window is closed and the underlying layout
is replaced with a different one (depending on a calculation).
Do I need to rework the initial script with the loop/end loop in some way to detect a new record?
Or try to work some magic with triggers on the original layout?