Setting Up the Right-Click Actions Menu for DataViews
Use the DataView Actions Setup form to set up right-click menu actions for components. You can specify the forms to open, executables to run, etc. The options you specify are displayed alphabetically in the dynamic menu list. You can specify a menu action at a class level so that the action is displayed each time a property of that class is displayed. For example, actions associated with the CustNum class can be available on any component that display a customer number field. You can also associate a menu action with a specific IDO or property to limit the action's availability to a more specific set of components.
Each time a user right-clicks on a component, the system dynamically builds the menu options based on the menu actions that are defined for the class, IDO, and property of the component value. The user can perform any of these types of actions that are defined:
- Launch a specific form that is filtered to show values from the selected component value.
- Run an executable program and pass it parameters that are values from the selected component value.
- Launch another component value.
- Perform a global search, which are available on all columns, that launches the DataSearch form that is filtered with values from the selected component value.
Setting the Caption for the menu option
In the Caption field, specify the text that displays for this action in the right-click menu. You can specify a string name here if you want the option to be translatable.
This field can be used to suppress multiple occurrences of the same command if the same action is available at different scope levels. Only one occurrence of a caption with the same name is displayed. If there are duplicate actions, the more specific level takes precedence: User, then Group, then Site, then Vendor.
Displaying the action on the Action Menu
If the action should be displayed on the Active. Clear this field to temporarily disable an action.
menu, selectSpecifying "Applies To" information
To set up actions that are shared by multiple forms and components, use the Applies To section of the DataView Actions Setup form to create a structure that identifies the cases where an action is displayed. Specify which property class, IDO, or property should have access to the action you are defining. If any fields in this section are left blank, the action applies to everything in that group. For example, if you specify a Class Name of CustNum, the menu action is enabled for every component that is associated with a customer number. However, if you specify the IDO as WBFSCustomers, then only those components that are built using the WBFSCustomers IDO display the menu action.
In this section, you can specify this information:
- Specify the Scope level to which this action applies: Vendor, Site, Group, or User. If the scope is Group or User, specify the group name or user name.
- Specify the Class Name of an IDO property class to which this action applies.
Specifying "Action" information
Specify this information to identify the action to take when a user selects the menu option:
- Specify the
Action Type to be
performed by this menu option: Run DataView, Run Form, or Run Executable.
- If the Action Type is Run DataView, you must specify the name of the DataView, the name of the layout to use when running the DataView, and the Filter Property, which is described below in "About Filters."
- If the Action Type is
Run Form, you must specify
the name of the form to open and the Initial Command: Refresh, Add, or
FilterInPlace to run on the target form when the action is called.
Specify the Filter
Property, which is described below in "About Filters."
Specify any variables to set on the target form. This list of variables must be separated by a comma and must contain the values to which to set them. For example, for a DataView action that opens the Order Verification Report using the selected CoNum in the component, set the value in SetVariables to OrderStarting=FP(CoNum),OrderEnding=FP(CoNum), where FP is a substitution keyword. This example sets both the starting and ending customer order number range of the report to the value of the CoNum in the form where you selected the action. The substitution keyword CURPROP() could be used instead of CoNum if there is a possibility that the property might have a different name, for example, CoCoNum. See "Substitution Keywords" below.
- If the Action Type is
Run Executable, click
and select the path and file name of the executable program that you
want to run when the action is selected. Note: The executable program runs on the client. If users that select this action cannot access the executable file on their local computers using the path you specified here, an error message is displayed.
- If the Action Type is Run Form or Run Executable you can apply extra filters in addition to the one in the Filter Property field. Click . The DataView Actions Filter Setup form is displayed. Substitutions are supported in this field, as described below in "Substitution Keywords." For more information, see Setting Up a DataView Actions Filter.
About Filters
If the Action Type is Run DataView or Run Form, you can use the Filter Property and Additional Filter fields to specify how you want to filter the resulting DataView or form.
The Filter Property is the property on the target form or DataView to which the value of the current property is filtered. For example, if you define an action with the caption Item Details, where the Action Type is Run Form and the Form Name is Items, then if a user right-clicks on the item number CP-10000 in a component and selects Item Details, the Filter Property is the property in the Items form that is filtered by CP-10000.
You can apply additional filters with the Additional Filter field and button.
Substitution Keywords
Substitutions are supported in the Additional Filter, Command Line Parameters, and Set Variables fields. Supported substitution keywords are P(...), FP(...), and CURPROP(). These keywords work the same way as they work in design mode, except that if the component is a DataView. P and FP refer to the properties in the current row of the DataView instead of the form collection, and CURPROP() refers to the name of the property on which the user right-clicked. Substitutions can be used in these cases:
- To filter by additional values in the collection
- To set variables on target forms from values in the form
- To pass a value from the form to an executable in a command line parameter