Setting up the right-click menu for DataViews

You can 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, 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 UserClass class can be available on any component that display a User Class 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.

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

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 translatable 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 forms and components, use the Applies To section of the DataView Actions Setup form. This creates 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:

Scope
Specify the level of scope to which this action applies: Vendor, Site, Group, or User. If the scope is Group or User, you must also specify the group name or user name.
Class Name
Specify the name of an IDO property class to which this action applies.

Specifying "Action" information

Select the Action Type to be performed by this menu option:

  • Run DataView: Provide this additional information:
    DataView
    Select the predefined DataView that is to be run when the option is clicked.
    Filter Property
    Optionally, select the property that is to be filtered on when retrieving data for the DataView. See "About filters."
    Layout
    Optionally, select the layout to be applied when the DataView is launched.
    Additional Filter(s)
    Optionally, provide additional filters to use on the data being retrieved. You can use the Additional Filter(s) button to launch the DataView Actions Filter Setup form, in which you can define and add the filters, correctly formatted.
  • Run Form: Provide this additional information:
    Form
    Select the form to launch when the right-click menu option is clicked.
    Filter Property
    Optionally, select the property that is to be filtered on when retrieving data for the DataView. See "About Filters."
    Initial Command
    Select the action that is to be taken when the form launches:
    • Refresh: This option opens the form and immediately returns all records in the collection (up to the record cap).
    • Add: This option opens the form in such a way that you are set to create a new record.
    • Filter In Place: This option opens the form in Filter-in-Place mode, so that you can set criteria by which to filter the records for display.
    Additional Filter(s)
    Optionally, provide additional filters to use on the data being retrieved. You can use the Additional Filter(s) button to launch the DataView Actions Filter Setup form, in which you can define and add the filters, correctly formatted.
    Set Variables
    Specify any variables to be set on the target form when it launches.

    Separate the variables in a list of multiple variables with commas. The list of variables must contain the values to which to set them.

    For example, for a DataView action that opens the User Class Report using the selected component, ClassNameStarting, set the value in this field to ClassNameStarting=FP(UserClass),ClassNameEnding=FP(UserClass), where FP is a substitution keyword. This example sets both the user class starting and ending range of the report to the value of the UserClass in the form where you selected the action. The substitution keyword CURPROP() could be used instead of UserClass if there is a possibility that the property might have a different name, for example, DefUserClass. See "Substitution keywords."

  • Run Executable: Provide this additional information:
    Executable Name
    Provide the path and filename of the executable program that you want to run when the action is selected. You can use the Browse button to locate and select the executalbe program.
    Note:  The executable program runs on the client side. If users who select this action cannot access the executable file on their local computers using the path you specify here, an error message displays.
    Command Line Parameters
    Enter any command line parameters you want to use to further customize the way in which the executable program is to open. See About application startup parameters.

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 data returns.

The Filter Property is the property on the target form or DataView on 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 using 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 as they work in the designer (Web Designer or 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 by means of a command line parameter