Menu Conditions

Previous Next

Using menu conditions, you can provide conditional access to menu options for specific user groups and users.


Suppose the Travel Agency application has one generic TRAVEL_MAIN menu page for all user groups. The underlying menu structure contains a menu entry leading to the Staff Members info window.

However, only the STAFF user group is allowed to access this menu option. Other user groups, such as GUIDE, are not allowed to access this menu option. For these other user groups, the Staff Members menu option must be hidden.

Note that this behavior differs from providing table rights on the STAFF_MEMBER table in the Authorizer.

It is possible to specify different menu structures for different user groups, with different First Menu Pages. However, for this purpose, it is easier to specify conditional behavior for specific menu options.

You can specify a SELECT statement in the Menu Conditions window. This SELECT statement specifies the condition that determines the visibility of a menu line. For example:


FROM    dual

WHERE   UserGroup() = 'STAFF'


After you have defined this statement and a Name for this statement, an Id is generated. Suppose there is a menu option with menu line: Staff Members.

In the Menu Lines window, you can now specify:

The Menu Page of this menu option, for example: TRAVEL_MENU.

The Menu Line of this menu option, for example: Staff Members.

The Id of the Menu Condition.

The Visibility of this menu option: Disabled (greyed out) or Hidden.

If a user within the STAFF user group opens the application, or if the user currently logged in is changed run-time into a STAFF user, the corresponding menu option can be accessed. For other users, the menu option is disabled or hidden.

NOTE: Menu conditions are checked:

When the application is opened.

When the user currently logged in is changed run-time.


See Also
User Groups

How to Define Menu Conditions

Changing the User Currently Logged In Run-Time