AMT Help Files

CLOSEFORM

Syntax

Command
Mandatory parameter
Optional parameter
Mandatory keyword
Optional keyword

CLOSEFORM ()

Description

Closes the current subsession (multitab or popup form), provided that it is not the main session.

Diagram

N.A.

Returned value type

None

Parameters

None

Remarks

A CLOSEFORM is implicitly being followed by a REFRESH. This means that after having closed the current subsession, the previous form will appear again. Only in case of closing a popup form, there will also follow a new execution of the PROCESS_MAIN routine of the re-appearing form. This means that if a close of a multitab subsession would be concerned, this routine would not be executed again.
In addition a CLOSEFORM command also sets the ERROR system item to true.

The CLOSEFORM command cannot be used in a form which has COM/DCOM enabled and or Web service enabled. The CLOSEFORM command has no meaning in a COM/DCOM or Web service connection to the form since no actual graphical form exists. The usage of the command is therefore prohibited when one of these options 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.

  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

Example


closeform()

 

Return to

Commands