Setting Up the Right-Click Actions Menu for DataViews

Use the DataView Actions form to set up right-click menu actions for DataView columns. You can specify the forms to open, executables to run, and so on. 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 are available on any DataViews that display a customer number field. You can also associate a menu action with a specific IDO and/or property to limit the action's availability to a more specific set of DataViews.

Note:  The options you specify in the dynamic menu list are displayed alphabetically within Action Type.

Each time a user right-clicks on a cell in a DataView, the system dynamically builds the menu options based on the menu actions that are defined for the class, IDO and property of the underlying DataView value. The user can perform any of these types of actions that are defined:

  • Launch a specific form, filtered to show values from the selected DataView record.
  • Run an executable (program) and pass it parameters that are values from the selected DataView record.
  • Launch another, predefined DataView.
  • Perform a global search, available on all columns, that launches the DataSearch form, filtered with values from the selected DataView record.

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 Action menu, select Active. Clear this field to temporarily disable an action.

Specifying "Applies To" Information

To set up actions that are shared by multiple DataViews and columns, use the Applies To section of the DataView Actions 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 DataView column that is associated with a customer number. However, if you specify the IDO as WDFSCustomers, then only those DataViews that are built using the WBFSCustomers IDO display the menu action.

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 or user name to which it applies.
  • 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, 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, specify the Form Name of the form to open and the Initial Command (Refresh, Add, 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 must be a comma-separated list of variables and 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 DataView, 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 DataView 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. For more information, see "Substitution Keywords" below.

    • If the Action Type is Run Executable, click Browse and select the path and file name of the executable program that you want to run when the action is selected.
      Note:  The executable runs on the client. If users selecting this action cannot access the executable file on their local computers using the path you specify 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 Additional Filter. The DataView Actions Filter Setup form is displayed. Substitutions are supported in this field, as described below in "Substitution Keywords." For more information, see DataView Actions Filter Setup.

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 will be 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 DataView 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.

See Setting Up a DataView Actions Filter.

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 that they work in design mode, except that 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 DataView
  • To pass a value from the DataView to an executable in a command line parameter
Related topics