The MENU sub-dialog

The MENU sub-dialog implements a list of choices for the user by using action handlers.

Important: The MENU syntax in declarative DIALOG blocks has been introduced for parallel dialogs. For now, a menu sub-dialog cannot be used with SUBDIALOG in a procedural DIALOG block, this may be supported in a future version. When using a menu as SUBDIALOG, runtime raises error: -8350: Not supported yet: sub-dialog kind of MENU.

MENU implements a list of action handlers

The following code example shows a MENU sub-dialog implementing a couple of action handlers with an ON ACTION clause or with a COMMAND clause (action views of COMMAND can get the focus):

DIALOG ()
   MENU
      ON ACTION customer_view
         ...
      ON ACTION order_view
         ...
   END MENU
END DIALOG

Control blocks in MENU

Simple record input declared with the INPUT sub-dialog can raise the following triggers:

In the singular MENU instruction, BEFORE MENU and AFTER MENU blocks are typically used as initialization and finalization blocks. In an MENU sub-dialog of a DIALOG block, BEFORE MENU and AFTER MENU blocks will be executed each time the focus goes to (BEFORE) or leaves (AFTER) the action views (buttons) controlled by this sub-dialog.