Configuring Custom Actions
DBM allows administrators to define their own actions. These actions can be executed by a click on a user-defined toolbar button, from the context menu (right-click menu) of selected table items, or from the "Entry" main menu. To configure a custom action, use the Digas Administrator tool (Admin.exe) or the DPE admin page.
Common Configuration
Each custom action is configured in a subfolder of the | DBM | Actions | key. The name of the subfolder is not relevant to execution of the action; however, when you assign a keyboard accelerator to the action, the accelerator is named after the folder, so folder names should be meaningful.
You can define custom actions at GLOBAL, LOCAL, use USER level of the Digas registry. You can even define some parts at GLOBAL, others at LOCAL and yet others at USER level. If you do that, each action must use the exact (except for upper/lower case) same folder name at each level.
- Use the DigaSystem Administrator tool or DPE Admin to add the configuration data to the Digas registry.
- Create the registry folder | DBM | Actions | if it does not exist.
- Inside this folder, create a folder for each custom action.
- Inside the action folder, create entries as described below.
Configuration entries depend on the type of action; this section descriped entries that are common to all types of action.
Parameter Name | Comment |
---|---|
Action | Launch specifies that this action should launch an external program. Workflow specifies that a DPE workflow is scheduled for immediate execution. The default value is Launch. |
ActionRight | If not empty, defines the name of an action right that the user must have to execute this action. If empty or undefined, no action right is required. |
Enabled | Set to FALSE to hide the button for a specific workstation or user. The default value is TRUE. |
Label | Defines the text that is displayed while the mouse hovers over the button, and the text that is displayed in various menus. The default is the name of the containing configuration folder. |
DisplayIndex | The display index defines the order in which custom actions are displayed in the toolbar and in menus. Actions are displayed in order of ascending DisplayIndex values. Actions that have the same DisplayIndex appear in arbitrary order. The default value is 0. |
Picture | Defines the graphic that appears on the toolbar button. This entry contains the full (absolute) path of the file. The file can be any of the following formats: EMF, PNG, BMP. If empty or not defined, a default image is used. |
ApplySymbolColor | Set this entry to to TRUE when the Picture parameter points to an image that is white on transparent background. DBM will set the foreground color to the standard symbol color, so that the button appears like the standard DBM toolbar buttons. You should use this option whenever possible in order to get a consistent appearance of DBM's user interface, independent of the currently used color scheme. The default value is FALSE. |
SymbolColor | Define this parameter to colorize a white-on-transparent image. Note that ApplySymbolColor must be set to 1 for this parameter to work. The default color is the standard icon color from the color scheme. |
Launching an External Program
When you configure Action=Launch (this is the default Action value), DBM launches an external program when you click the button or select the menu entry. Optionally, DBM can move its application window on the screen so that the other part of the screen is available to the external program. In addition to the configuration entries mentioned under Common Configuration, the following entries are required.
Parameter Name | Comment |
---|---|
Config | Either the name of a program that is known to the Digas System (i.e. a program that has an entry in the | Programs | folder), or the full path of the executable file. This parameter is mandatory. |
DbmResize | If not empty, the DBM window will be resized and/or moved after the configured program has been launched. Possible values are:
The following options are valid for two-monitor setups only:
If this value is not configured, DBM does not move or resize its window. |
If Config is empty, no button is created.
Triggering a DPE Workflow
With Action=Workflow, you can request execution of a workflow from your DPE system. This can only work if you have a DPE system installed that connects to the same database and configuration values as DBM. Configuration is the same as under Common Configuration, with the following additions.
Parameter Name | Comment |
---|---|
Config | The workflow configuration. See Configuration for Starting a Workflow for an Entry for details. This parameter is mandatory. |
Action=Workflow custom actions are not available while no database entry is selected. They may be unavailable when multiple items are selected, or when selected items do not have the configured class; this is defined on the Config entry as documented in Configuration for Starting a Workflow for an Entry.
Configuring Sub Menus
When you have a large number of custom actions, it may help to group these actions into menus. The DBM custom actions configuration lets you create menus that contain a subset of available actions. This menu is represented by a toolbar button and by a submenu entry in the menus. Its name, graphical symbol, position etc. are configured with the entries listed under Common Configuration. The Action entry is ignored (it is not required). To flag this entry as submenu entry, create the Children folder in this configuration folder, such as | DBM | Actions | <MenuButton> | Children | <SubMenuButton> |. Inside the Children folder, add folders for SubMenuButton(s) that configure actions.