Identifying actions in dialog methods

In ui.Dialog methods such as setActionActive(), the first parameter identifies the action object to be modified. This parameter can be full-qualified or partly-qualified. If you don't specify a full-qualified name, the action object will be identified according to the focus context.

The action name specification can be any of the following:

Here action-name identifies the name of the action specified in ON ACTION action-name or COMMAND "action-name" handlers, while dialog-name identifies the singular dialog or sub-dialog and field-name defines the field bound to the action INFIELD clause of ON ACTION.

The action name must be passed in lowercase letters.

The runtime system will raise the error -8089 if the action specified by [dialog-name.][field-name.]action-name can not be found within the current dialog.

Note: As a general rule, assign unique action names for each specific dialog action, to avoid the usage of dialog and/or field identifiers.

In the DIALOG instruction, actions can be prefixed with the sub-dialog identifier. However, if methods like setActionActive() are called in the context of the sub-dialog, the prefix can be omitted. When using a field-specific action defined with the INFIELD clause of ON ACTION, you can identify the action with the full-qualified name dialog-name.field-name.action-name. Like sub-dialog actions, if you specify only action-name, the runtime system will search for the action object according to the focus context.

Note that an INPUT or CONSTRUCT sub-dialogs have no identifier by default. The dialog name can be defined with the NAME attribute. For more details, see Identifying sub-dialogs in procedural DIALOG.

When using a singular dialog like INPUT, you can identify field-specific actions by field-name.action-name, if the dialog was defined without a NAME attribute.

Example

DIALOG ...
   ...
   INPUT BY NAME cust_rec.* ATTRIBUTES(NAME="cust")
      ON ACTION compare
         ...
      ON ACTION check INFIELD cust_city
         ...
   END INPUT
   ...
   DISPLAY ARRAY orders TO sr_ord.*
      ...
      ON ACTION archive
         ...
   END DISPLAY
   ...
   ON ACTION print
      ...
   ON ACTION disable_all
      CALL DIALOG.setActionActive("cust.compare", FALSE)
      CALL DIALOG.setActionActive("cust.cust_city.check", FALSE)
      CALL DIALOG.setActionActive("sr_ord.archive", FALSE)
      CALL DIALOG.setActionActive("print", FALSE)
END DIALOG