Define a postform trigger to execute as the format file is exited
SET POSTFORM TO [<procedure-name> | (<expC>)]
The POSTFORM trigger procedure executes a procedure upon exiting a format file with the [EXIT/SAVE] key. The SET POSTFORM TO <procedure-name> command defines the procedure or program name to be executed. The filename can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename. The SET POSTFORM TO command clears the active <procedure-name>.
The SET POSTFORM trigger can also be defined from within the SCREEN PAINTER work surface. The POSTFORM procedure option from the TRIGGERS menu is used to define the trigger name. The [HELP] key may be pressed here to edit the trigger file from inside the SCREEN PAINTER.
set postform to save_count edit