Understanding declarative dialogs

Declarative dialogs are defined with DIALOG blocks at the module level.

A declarative dialog block is a module element defined at the same level as a FUNCTION or REPORT routine:

-- Module orders.4gl
SCHEMA stock
DEFINE arr DYNAMIC ARRAY OF RECORD LIKE orders.*
DIALOG orders_dlg()
  DEFINE x INT
  DISPLAY ARRAY arr TO sr_orders.*
     ...
  END DISPLAY 
END DIALOG
The name of a declarative dialog is mandatory. A SUBDIALOG clause will reference a declarative dialog by its name, and can identify sub-dialog actions with a prefix. For more details, read Sub-dialog actions in procedural DIALOG blocks.

When using the DIALOG keyword inside a declarative dialog block to use ui.Dialog class methods, it references the current instance of the dialog object.