šŸš€ Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Action menu groups
This page was created by Stephanie on 2023-08-10. Last edited by Wikiadmin on 2026-07-29.

You can organize global actions into ordered top-level menus, nested submenus, and visually separated action sections by defining menu groups in MDriven Designer.

What menu groups do

A menu group determines where a global action appears in the rendered global menu. Assign an action to a group such as Views to place it below the Views menu instead of at the menu root.

A group can also describe a submenu path. Use a forward slash (/) between each level:

Menu-group name Result in the global menu
Views An action is placed in the Views menu.
Views/Special An action is placed in the Special submenu below Views.
Views/More An action is placed in the More submenu below Views.

For example, assign an action named ShowArchivedOrders to Views/Special. Users find it under Views → Special.

Create a menu group

  1. Open the global-action editor in MDriven Designer.
  2. Select an existing global action, or create the action that you want to place in the menu.
  3. Locate the action's Menu group setting and click the three-dot button next to it. This opens the menu-group editor.
  4. Click Add Menu Group.
  5. Enter the group name. For a submenu, enter the complete path, for example Views/Extra.
  6. Set a Sort Key for the new group.
  7. Return to the action and select the new menu group.
  8. Inspect the rendered global-menu preview at the top right of the action editor to confirm the placement.

To rename a group, select it and enter edit mode. Press F2, or click the group again slowly. Avoid double-clicking Add Menu Group; this opens a debug property editor rather than the normal name-editing flow.

Order menus and submenus

Use a Sort Key on each menu group to control the order of menu entries. Sort keys are compared as alphanumeric strings, so use a consistent fixed-width convention rather than relying on the group names.

For example, this convention reserves the first three digits for the top-level menu and the next two digits for its submenu:

Menu-group name Sort Key Intended position
File 001 First top-level menu
Edit 002 Second top-level menu
Views 00400 Views top-level menu
Views/Special 00401 First submenu below Views
Views/More 00402 Second submenu below Views

The exact numbering scheme is your choice. The important rule is that related groups use keys that sort together and leave room for later additions. For example, you can add Views/Extra with 00403 without renumbering the earlier submenus.

Ordering actions inside a menu group

A menu group's Sort Key controls the menu or submenu position. Use the action's sort order within its assigned group when you need a specific order for the actions displayed there.

For example, in Views/Special, give ShowAllThings an action sort order of AAA and ShowArchivedThings an action sort order of BBB. The first action is shown before the second.

When menu metadata is consumed outside the standard client, its documented ordering is alphanumeric: sort by MenuGroupSortKey, then DividerGroupTagSortKey. See Documentation:Getting safe–limited–meta information from a Turnkey app for the menu metadata contract.

Separate actions with dividers

A divider group is an identifier that divides actions into visual sections within the same menu group. The divider-group name is not displayed to the user.

Assign the same divider-group identifier to actions that belong together. A divider is placed between adjacent sets of actions whose divider-group identifiers differ.

For example, place all three actions in Views/Special:

Action Menu group Divider group Result
ShowOpenOrders Views/Special Current Shown in the first section
ShowArchivedOrders Views/Special Archive Shown after a divider
ExportArchivedOrders Views/Special Archive Shown with ShowArchivedOrders, with no divider between them

Use the action sort order to order actions within each section. Do not use divider-group text as a user-facing caption; it is only an organizational tag.

Verify the menu while designing

The action editor renders the global menu from the current settings. Use this preview after every change to group assignment, Sort Key, divider group, or action sort order.

You can select an action either from the action list or from the rendered menu. For a navigating action, the view icon next to the menu item opens the target ViewModel in the designer; clicking the menu item itself selects the action.

An empty menu group is not useful as a visible menu on its own: a menu becomes visible when actions are assigned to it. Assign at least one appropriate global action before expecting the group to appear in the rendered menu.

Keep grouping separate from access control

Menu groups organize where actions appear; they do not grant permission to use an action. Use Access Groups to control whether actions are enabled or visible for a user or situation. Use Interest Groups when you want users or user-focused criteria to reduce menu clutter without replacing access control.

For actions shown in a contextual action menu rather than the global menu, see Documentation:OCLOperators ShowActionMenuForCurrentInNesting.

See also