AMT Help Files

CLOSEFORM

Syntax Color Legend
Command
Mandatory parameter
Optional parameter
Mandatory keyword
Optional keyword

Syntax

CLOSEFORM ()

Description

Closes the current sub-session (multi-tab or pop-up form), provided that it is not the main session.

Diagram

N/A

Returned value type

None

Parameters

None

Remarks

A CLOSEFORM is implicitly followed by a REFRESH. This means that, after the current sub-session is closed, the previous form appears again. Only when a pop-up form is closed is the PROCESS_MAIN routine of the reappearing form executed again. If a multi-tab sub-session is closed, this routine is not executed again. In addition, the CLOSEFORM command also sets the ERROR system item to true.

The CLOSEFORM command cannot be used in a form that has COM/DCOM enabled or web service enabled. The command has no meaning in a COM/DCOM or web service connection to the form because no actual graphical form exists. Therefore, the command is prohibited when either option is enabled.

Form calling priority

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.

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

Example

closeform()

Return to

Commands

Contents