A script-enabled browser is required for this page to function properly.

Allowing End Users to Quit from a Called Form

It is often desirable to allow end users to quit an application from a called form, rather than requiring them to explicitly exit each form in the call stack. You can accomplish this by using a global variable that indicates whether the end user wants to quit the entire session or return to the calling form. (Global variables are visible across called forms.)

For example, the called form might have a button labeled QUIT that allows end users to quit the entire application from a called form. The When-Button-Pressed trigger for each button sets the value of a global variable to indicate that the end user wants to either quit the session or return to the calling form.

When-Button-Pressed Trigger on QUIT button in Called Form B:

:GLOBAL.quit_check := 'quit';
Exit_Form;

Then, in the calling form, read the value of the global variable immediately after the CALL_FORM procedure statement:

Trigger Text in Calling Form A:

CALL_FORM('form_b');

/*
** The following statements execute immediately after
** returning from the called form.
*/
IF :GLOBAL.quit_check = 'quit' THEN
exit_form;
END IF;