Each command has a name, display name, tooltip, shortcut, security form, type, images, toolbar options, and ribbon options. The Command Defintion window is used to create commands and specify their characteristics.
Each command has a name that is used in scripts to refer to the command. To make the name easier to use in script, you can use underscores (_) between parts of the name instead of spaces.
The display name is the name that appears when the command is displayed in a menu or on a toolbar in the application.
You can define an access key for the command by placing an ampersand (&) in the display name. The ampersand won’t be displayed in the command name at runtime. Instead, the character immediately following the ampersand will be underlined. To choose the menu item, a user can press the ALT key and the underlined character at the same time.
To display special characters in the display name, such as ampersands or forward slashes, you must precede them with a backslash. For example, the following display name will display an ampersand character:
Time \& Billing
When a command is used on a toolbar, it will display a tooltip if one is provided.
The shortcut for the command is a combination of a modifier key (Control, Alt, or Shift) and an alphanumeric or function key. When the command is enabled, the user can execute the command by using the specified key combination.
This is the form that the user must have security privileges to access for the command to be accessible.
A command can be one of the following types:
Form A form command opens the specified form. Use the lookup button to select the form to open.
Script A script command runs the supplied sanScript code.
Data List A command that will open a data list form and display data in a list view.
Command List A command list command is a container for other commands. A command list can be used as a menu, submenu, or a toolbar. Commands are added to a command list through sanScript code.
Icons or Native pictures are used as the images for commands. For proper display on toolbars, the images should be 20 pixels by 20 pixels. Two images can be supplied:
Normal Image This is the image displayed when the command is used on a toolbar, and is in the unchecked state.
Checked Image This is the image displayed when the command is used on a toolbar, and is in the checked state. Use the check command and the uncheck command to toggle the command between the checked and unchecked state.
You can specify whether the command will appear as text, as an image, or with both the text and image.
The following options apply when the command is used on a ribbon for a data list.
Button Size Indicates the size of the button on the ribbon. It can be large or small.
Layout Priority Indicates the preferred position of a command when it appears in a group on the ribbon. The Primary position is a large icon in the group. The Secondary position is a smaller icon verticallly stacked on the right side of the group. The Force Overflow position is in a pull-right menu acessible on the right side of the group.
Button Type For script commands used in the ribbon for a data list, specifies the type of behavior the command will initiate. Choose Action Button to specify that a standard sanScript processing will be performed by the command. Choose Drop Dialog to specify that the command will open a drop dialog window to perform the action for the command.