Defining a context menu
A context menu contains menu and sub-level menu items, for individual BMC Remedy AR System table objects including list view tables, tree view tables, and cell-based tables. For more information about tables, see Working with tables.
You can define and customize a context menu. You can change the order of the menu items and its labels through Developer Studio. You can define workflow to execute upon the selection of the menu item. You can also use workflow to enable or disable menu items or to hide or show menu items.
BMC Remedy AR System provides the capability to create static and dynamic context menus. A static menu is one that has a static list of items and can have multiple levels. You need to plan your menu structure; labels, hierarchy, and order of items, before creating a context menu with static items.
On the other hand, a dynamic context menu provides you greater flexibility with the menu items. The values for the menu items are attached at run-time. Menu from any of the supported BMC Remedy AR System menu types can be attached. See Working with menus. You can use entries from an existing BMC Remedy AR System form as menu items by attaching it to a context menu.
The following figure shows the dynamic context menu with a label. In this case, the menu items are added as a sub-menu.
Dynamic context menu with label
The following figure shows the dynamic context menu without a label. In this case, the dynamic context menu is attached to the main menu.
Dynamic context menu without label
For more information about workflows, see Workflow considerations for table fields. For more information about creating sub-menus, see Creating character menus.
Tocreate a static context menu
- Open the form to which you want to add the context menu.
- Add the required table fields to the form. For more information, see Adding a table field to a form.
- Right-click on the table and select Edit Menu/Navigation Items.
The Edit Context Menu dialog box is displayed.
Alternatively, you can also select the table field and click Form > Edit Menu/Navigation Items to display the Edit Context Menu dialog box.
- In the Edit Context Menu dialog box, use the Add Menu, Add Item, and Add Separator buttons to create menus for the field. These menu items are appended to the default context menu items.
To remove the default context menu items from the context menu, set the labels to "" in BMC Remedy Developer Studio.
- Right-click the form, and select Save.
To create a dynamic context menu in a table field
- Setting fields in the form:
- Follow steps 1-5 as specified in to create a static context menu to create a table with context menu.
- Add a Character field and a Button to the form.
- For the Table, Character field, and Button fields added in step a and b, change the Label names to more meaningful names. To do this, open the Display properties in the Properties editor to update the Labels. See Field properties.
- In the Properties editor for the table, open the Database properties for the context menu and copy the Id.
Make a note of the field Id of the context menu item to which the BMC Remedy AR System menu will be attached. At run-time, the workflow accepts the field Id and dynamically attaches the context menu.
- Right-click the form, and select Save.
- Define an Active Link that attaches the context menu at run-time
- Open a new Active Link and associate the form with it.
- Set the Active Link to execute on the Button field that you have set on the form in step 1b.
- Right-click If Actions and select Add Action > Change Field.
- In the Field list, select Field Value. Click the ellipsis button. From the Field /Keyword Selector dialog box, select the Character field added in step 1b.
The runtime value of this field determines the context menu to be attached.
- In the Menu list, select Changed. Enter the name of the menu to attach or click the ellipsis button to select the menu from the Menu/Keyword Selector dialog box.
- Save the Active Link.
If the context menu is disabled, the items attached to the context menu will also appear disabled. Similarly, if the context menu is hidden, the items attached to the context menu are not visible to the user.