Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

Form OK and CANCEL Callbacks

  • Last UpdatedOct 25, 2022
  • 2 minute read

The form supports the concepts of OK and CANCEL actions:

The OKCALL callback is executed when a form's OK button is pressed or when the OK button of a form's ancestor has been pressed. For further information, refer to Free Forms and Form Families.

It allows operators to approve the current gadget settings and carry out the function of the form. The form is then removed from the screen. Typically this callback will gather all the data from the form's gadgets and perform the form's major task. If you do anything of significance in callbacks on other gadgets, you may have a hard time undoing everything if you press the CANCEL button.

You can assign to the form's OKCALL member using the command:

OKCALL 'CallbackString'

You can modify the Okcallback at any time using:

!this.Okcall = 'CallbackString'

The CANCELCALL callback is executed when a form's CANCEL button is pressed, when the CANCEL button of a form's ancestor is pressed (see section on Form Families), or when the window's CLOSE gadget is used. It allows the operator not to proceed with the functions of the form.

The form is then removed from the screen and all gadgets are automatically reset to the values they had when the form was displayed, or when any APPLY button was last pressed. Typically this callback allows you, the PML programmer, to undo any actions already carried out on the form that ought to be undone in the light of the CANCEL request.

You can assign to the form's CANCELCALL member using the command:

CANCELCALL 'CallbackString'

You can modify the CANCELcallback at any time using:

!this.Cancelcall = ‘CallbackString’

For further information, refer to Button Gadgets.

Related Links
TitleResults for “How to create a CRG?”Also Available in