Appboard/2.4/builder/widgets/actions/apply a filter to a data collection: Difference between revisions

imported>Mike.berman
(create page for AppBoard 2.4)
 
imported>Mike.berman
No edit summary
Line 26: Line 26:
# <b>Filter data collection</b>: Select the name of the data collection to be filtered.
# <b>Filter data collection</b>: Select the name of the data collection to be filtered.
# Click <b>Add Rule</b> to add the filter. Select one of the following from the list of options:
# Click <b>Add Rule</b> to add the filter. Select one of the following from the list of options:
#* [[Regular_Expression_Filter|Match Regular Expression]] - This rule is used for comparison of a property's value to a regular expression.
#* [[appboard/2.4/builder/match_regular_expression|Match Regular Expression]] - This rule is used for comparison of a property's value to a regular expression.
#* [[Compare_Static_Value_Filter|Simple Property Comparison]] - This rule compares the value of one attribute in a Data Collection to a constant value.
#* [[appboard/2.4/builder/simple_property_comparison|Simple Property Comparison]] - This rule compares the value of one attribute in a Data Collection to a constant value.
#* [[Widget_Interaction_Filter|Widget Interaction Comparison]] - This rule compares the property values of a Widget to a local property's value.  This filter requires a [[Widgets|widget]] to have already been created.  It is intended to apply a filter on a target Widget (Data Collection) based on the selection from the source Widget (really of a single record in the Data Collection that provides the data for the source Widget), hence the Widget Interaction name.
#* [[appboard/2.4/builder/widget_interaction_comparison|Widget Interaction Comparison]] - This rule compares the property values of a Widget to a local property's value.  This filter requires a Widget to have already been created.  It is intended to apply a filter on a target Widget (Data Collection) based on the selection from the source Widget (really of a single record in the Data Collection that provides the data for the source Widget), hence the Widget Interaction name.
# Checking the '''Show Clear Filter Button on Widget''' box will provide a button on the Widget that the User can click, after the filter is invoked, to stop the filter from being applied and show the original full Data Collection.
# Checking the '''Show Clear Filter Button on Widget''' box will provide a button on the Widget that the User can click, after the filter is invoked, to stop the filter from being applied and show the original full Data Collection.
#*From the drop-down list, select the name of the Widget on which you want to display the Clear Filter button.
#*From the drop-down list, select the name of the Widget on which you want to display the Clear Filter button.
#*'''Clear Label Button Field''' indicates what value should be used for the label that will be shown on the clear button.
#*'''Clear Label Button Field''' indicates what value should be used for the label that will be shown on the clear button.
# Click '''Finish''', go to the '''Builder''', and select an item that will initiate the filter to validate the "Apply a Filter to a Data Collection" Action.
# Click '''Close''' to exit the <b>Widget Actions</b> panel and return to the Builder.





Revision as of 19:06, 4 September 2013

The "Apply a Filter to a Data Collection" Action will apply a client-side filter to a Data Collection when a User clicks to invoke the Action in a Widget. This Action is provided to empower Users to control the data that they are viewing to meet their current needs. The Data Collection that is filtered does not need to be the Data Collection that is driving the selected Widget. Thus, it is possible to click in one Widget and have this Action filter the presentation of other Widgets.


For more information on the concepts of filtering Data Collections in AppBoard, see Filtering Data Collections.


How To Add Actions To A Widget

For instructions on adding an Action to a Widget, see the general instructions in How To Create an Action in a Widget.


How To Configure the Apply a Filter to a Data Collection Action

Perform the following steps to configure an "Apply a Filter to a Data Collection" Action:


  1. Follow the instructions above to create the Action in the Widget Actions panel.
  2. Name: Enter a name for this Action. For convenience, a default name is provided that you may use. The Name is not used anywhere else in AppBoard, and only displayed on this configuration page.
  3. On selection of:
    1. Select "any" or "specific" for the type of data selection by the User that will trigger the Action. When selecting "specific", perform the following additional steps:
      1. Click the Filter button. The Filter Editor is displayed.
      2. Click Add Rule to create one or more rules that indicate what data should trigger the Action, when selected.
      3. Click Close to save the Filter settings.
    2. Select the Data Collection name. When the Widget is run, selection of data in this Data Collection will trigger the Action.
  4. Filter data collection: Select the name of the data collection to be filtered.
  5. Click Add Rule to add the filter. Select one of the following from the list of options:
    • Match Regular Expression - This rule is used for comparison of a property's value to a regular expression.
    • Simple Property Comparison - This rule compares the value of one attribute in a Data Collection to a constant value.
    • Widget Interaction Comparison - This rule compares the property values of a Widget to a local property's value. This filter requires a Widget to have already been created. It is intended to apply a filter on a target Widget (Data Collection) based on the selection from the source Widget (really of a single record in the Data Collection that provides the data for the source Widget), hence the Widget Interaction name.
  6. Checking the Show Clear Filter Button on Widget box will provide a button on the Widget that the User can click, after the filter is invoked, to stop the filter from being applied and show the original full Data Collection.
    • From the drop-down list, select the name of the Widget on which you want to display the Clear Filter button.
    • Clear Label Button Field indicates what value should be used for the label that will be shown on the clear button.
  7. Click Close to exit the Widget Actions panel and return to the Builder.


Sample Use Case

Suppose you are providing a Map Widget with nodes representing several stores in a region. You may want to provide an action where when the User clicks on a store (node) in a particular region on the map, only the stores from that region are shown and stores from the other regions are removed. You can create an Apply a Filter to a Data Collection Action. This can temporarily filter the Data Collection to show only stores which have a region code matching the region code of the selected store.