| Syntax Color Legend |
|---|
| Command |
| Mandatory parameter |
| Optional parameter |
| Mandatory keyword |
| Optional keyword |
GOTOFORM ([<Form> [, <Help>[, NEW]] | BYE])
When the current form finishes, execution will continue with DISPLAY_MAIN of the mentioned form.
None
| Parameter | Description |
|---|---|
| <Form> | Expression giving the name of a form. This option is not available inside popup forms. |
| <Help> | If the help screen parameter is used, the set help page will be opened in a new tab. Allowed values are:
|
| NEW | Opens the (help) screen in a new tabsheet and counting as new subsession, provided that AMT Screens is used and the Tabforms setting for the application has been set to either "Multiple tabforms with Shared Session Data" or "Multiple tabforms with Private Session Data". When choosing for Private Session Data, there will be created a copy of the Retained Session Data for the calling screen (which will not be the case for retained variables). The NEW parameter is not supported for the AMT Webclient. |
| BYE |
Terminates the application. Note:
is the same as |
When the form is omitted, the current form is displayed (DISPLAY_MAIN is skipped).
Using the GOTOFORM command, it is possible to edit a dummy form that does not use the layout, but only does some
checks and then starts another form.
In addition a GOTOFORM command also sets the ERROR system
item to true.
If the option Security checking GOTOFORM is enabled in the Control Center, the runtime Business Logic will check if a user has rights to access the requested form when a GOTOFORM is executed.
The commands 'gotoform', 'refresh', 'closeform' and 'showpopup', all execute the remaining display/process main logic, so it is possible that multiple instances of these commands are encountered before the transaction has ended.
The table below explains which command takes priority and is ultimately executed.
1 Indicates that this command overrules the previously encountered command, which is now not executed.
2 Indicates that the previous command takes precedence over this command, so it is the previous command only that is executed.
3 Indicates that both commands will be executed.
| This command | Previous command | |||||
|---|---|---|---|---|---|---|
| gotoform (form) | gotoform (BYE) | refresh () | closeform () | showpopup (popup form) | gotoform ( form, , NEW) | |
| gotoform (form) | 1 | 1 | 1 | 1 | 1 | 3 |
| gotoform (BYE) | 1 | - | 1 | 1 | 1 | 1 |
| refresh () | 1 | 1 | - | 1 | 1 | 3 |
| closeform () | 1 | 1 | 1 | - | 1 | 3 |
| showpopup (popup form) | 1 | 1 | 1 | 1 | 1 | 1 |
| gotoform ( form, , NEW) | 3 | 2 | 3 | 3 | 1 | 3 |
The optional help screen request is not relevant for the priority of the commands. If the command is executed, any help screen also requested will be displayed.
(A)
gotoform (bye)
(B)
gotoform ('form_a', 'help_form_a', new)
(C)
gotoform ('Welcome')
(D)
gotoform ('form_b', 'TXT\help_form_b.txt', new)