ui.Dialog.cancel

Cancels a parent dialog from a sub-dialog.

Syntax

cancel()

Usage

The cancel() method can be used to terminate a dialog by ignoring the current input.

This method can be used to terminate the dialog in a function, outside the context of a dialog block, where control instructions cannot be used.

Tip: To skip code following the call to the cancel() method, use the CONTINUE DIALOG instruction: Combining cancel() + CONTINUE DIALOG is equivalent to the CANCEL DIALOG instruction.

When calling the cancel() method, the INT_FLAG is set to TRUE, the AFTER INPUT, AFTER DISPLAY or AFTER CONSTRUCT block of the current subdialog is executed, then the AFTER DIALOG block is executed.

Note: The default settings regarding action attributes for the cancel action define the validate attribute to "no", in order to avoid current field validation for this action. This is important when using the UNBUFFERED mode. For more details, see Actions configuration for field validation.

Example

DIALOG mysubinput()
    INPUT BY NAME ...
       ...
       ON ACTION cancel
          CALL DIALOG.cancel()
    END INPUT
END DIALOG