Creating an Event to Call DataView Results

You can create an event on a form to launch the DataView Results form.

  1. Open the form and go into Design Mode.  
  2. Add a button component to the form.
  3. With the button component selected, click the Events tab.
  4. Click the ellipsis(...) button for a Primary event.
  5. In the Event Handlers dialog box, click New.
  6. In the Event field of the Event Handler Properties dialog box, specify a name for the event.
  7. For the Response Type, select Run Form as Modal Child.
  8. Click the ellipsis button for Parameters.
  9. In the Events Handler Parms dialog box, click Type Specific Parameters.
  10. In the Specify Form Run Options dialog box, in the Form field, specify DataView Results (which might display as WBDataViewResults in the drop-down list).
  11. Click Set Variables.
  12. In the Edit Set Variable Values dialog box, click New.
  13. In the Edit Set Variable Value Pair dialog box, in the Target field, specify DataViewName.
  14. In the Value field, specify the name of the DataViewfor which  you want to see results.
  15. Optionally, use Steps 12 to 14 to create variables for a filter and/or a layout to use for the resulting DataView display.
    • For a filter, set Target to DataViewFilter, and set Value to the name (or an expression that resolves to the name) of the property you want to filter by.

      For example, to filter the results by salesperson, you might end up with something like DataViewFilter=Slsman=FP(Slsman) or DataViewFilter=Slsman='JoeDoe'.

    • For a layout, set Target to LayoutName, and set Value to the name of the layout you want to have displayed.

      For example, to display a layout named LeadsUser, you might end up with something like LayoutName=LeadsUser.

  16. Click OK until you return to the original form.
  17. Save your changes and test to verify that it produces the desired results.