To programmatically invoke, or call, another Form, execute the CALL_FORM Built-in procedure:
CALL_FORM(Formmodule_name CHAR,
display NUMBER,
switch_menu NUMBER,
query_mode NUMBER,
parameterList_name CHAR);
The Formmodule_name parameter is required; all others are optional. If you leave the optional parameters unspecified, Oracle Forms runs the called Form using the default values for those parameters. Note that the Formmodule_name parameter is the name of the .fmx file, and can include path information, and may be case sensitive depending on the operating system.
Thus,
CALL_FORM('Form_b');
is logically equivalent to
CALL_FORM('Form_b',
HIDE,
NO_REPLACE,
NO_QUERY_ONLY);
CALL_FORM loads the indicated Form while leaving the calling Form loaded. For example, when Form A calls Form B, Form B becomes the active Form in the session, but Form A remains in memory. If the end user exits Form B, Form A again becomes the active Form. Form B, in turn, can execute the CALL_FORM procedure to invoke Form C. When successive Forms are loaded via the CALL_FORM procedure, the resulting module hierarchy is known as the call form stack. Only one call form stack is allowed in a session.
When a Form calls another Form with CALL_FORM, the called Form is modal with respect to the calling Form. Windows that belong to the calling Form are not usable until the called Form is exited and control returns to the calling Form.
In contrast to the NEW_FORM procedure, CALL_FORM does not exit the current Form and release its associated memory before running the new Form at the current position in the call Form stack.
When you execute CALL_FORM, you can specify whether the calling Form should remain displayed by passing an appropriate constant for the display parameter. Valid constants are HIDE (the default) and NO_HIDE. The following procedure call invokes Form B and leaves Form A (the calling Form) displayed:
CALL_FORM('Form_B',
NO_HIDE);
Only the called Form is active, and end users cannot navigate to items in the calling Form until they exit the called Form.