ON ACTION clause

ON ACTION clause of a menu serves the same purpose as the COMMAND clause - it creates menu options. This clause gives you less flexibility in specifying the option name and description, but instead it allows you to make custom actions the menu option triggers. While the menu options defined by the COMMAND clause have the activation key, either default or specified in the KEY clause, the menu options specified by the ON ACTION clause have actions assigned to them. They cannot be triggered from the keyboard, but can be invoked using form widgets with the corresponding action assigned.

The menu ON ACTION clause is very similar to the ON ACTION clause in the user interaction statements such as INPUT. However, it has some restrictions:

 

Action

The name of the action with or without the quotation marks

The ON ACTION clause allows only one action to be assigned to the menu option. The action name can be with or without quotation marks. 4GL expressions are not allowed in the action specifications. The ON ACTION CLAUSE also does not have the optional HELP clause or the description for the menu option. The name of the menu option displayed will be the same as the action name used.

 The ON ACTION and COMMAND clauses can be present in the same MENU statement, for example:

MENU

COMMAND "my_command" "Update an existing record"

      CALL upd(current_rec)

ON ACTION exit

      EXIT MENU

END MENU

Appearance and behavior of toolbar buttons (including those created by ON ACTION clauses) depend on the Lycia version you use – jquery Lycia or Lycia with Material Design.

You can learn more about toolbar buttons in MD Lycia here.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.