ui.Dialog.accept
Validates and terminates the dialog.
Syntax
accept()
Usage
Use the accept()
method to validate field input and terminate the dialog.
The accept()
method is equivalent to the ACCEPT INPUT
/ ACCEPT DISPLAY
/ ACCEPT DIALOG
instructions.
It can be used for example 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
accept()
method, use the
CONTINUE DIALOG
instruction: Combining accept()
+ CONTINUE
DIALOG
is equivalent to the ACCEPT DIALOG
instruction.When calling the accept()
method, the AFTER INPUT
,
AFTER DISPLAY
or AFTER CONSTRUCT
block of the current subdialog is
executed, then the AFTER DIALOG
block is executed.
Typical dialog validation rules are performed
when calling this method. See ACCEPT DIALOG
for more details.
Example
DIALOG mysubinput()
INPUT BY NAME ...
...
ON ACTION accept
CALL DIALOG.accept()
END INPUT
END DIALOG