Creating a Filter

How to:

WebFOCUS Enable not only supports many filter conditions, but also enables you to design robust interactions between the filter controls in order to build complex OLAP-like panels, allowing end users to manipulate the data as needed.

WebFOCUS Enable supports the following filter conditions: Equal, Not Equal, Greater Than, Greater Than or Equal, Less Than, Less Than or Equal, Between, Contains.

WebFOCUS Enable also supports interactions between the following types of filter controls.

In this topic, you will work with the different kinds of filter controls.


Top of page

x
Procedure: How to Create a Filter Using a List Box

Using the Panel component, this procedure gives a distinct look and feel to a list box filter.

  1. Create another panel on the first tab using the instructions in Binding a Procedure to the ibiDataGrid Using Custom Components.
  2. Position the panel to the left of the grid, as shown in the following image.

    panel component in canvas

  3. Set the background color to #c0c0c0.
  4. Set the title to Select Region.
  5. Drag and drop the ibiList component onto the new panel.
  6. Set the following properties:
    • ibiParent=MAIN01. The data for the list will come from the main data grid.
    • ibiColumn=REGION. This column populates the list box. Only distinct values will be displayed.
    • ibiFilterAble=true. This property sets the component for use as a filter for other components.
    • ibiFilterCond=EQ
    • id=list1
  7. Select the MAIN01 ibiDataGrid and set its properties.

    To filter the main grid (MAIN01), you need to set only ibiUseFiltered to true.

    Tip: Set ibiUseFiltered to true for any component that you want to filter.

When you run the application, all components having the property ibiUseFiltered set to true will be filtered.

Sales Performance Dashboard in web browser


Top of page

x
Procedure: How to Create an Independent Filter
  1. Copy the panel for the first filter and paste it on the same tab.
  2. Position the panel between the first list box and the grid, and adjust its size.
  3. Delete the list box that is already inside the panel (it was carried over by the Paste operation).
  4. Insert a second list box and assign the list2 value to the ID.
  5. Set title to Select State, and set ibiColumn to ST.
  6. From the MAIN01 grid, select the ST (State) column.
  7. Run the application.

    Sales Performance Dashboard in web browser

    All data is filtered based on a single condition selected from one of the controls. Selecting a region filters the data in the grid for only that region.

    Selecting a condition from another box resets the filter to the newly selected value. Selecting a state (from the second list box) that belongs to a different region filters the main grid to display only the records for the selected state.


Top of page

x
Procedure: How to Create a Nested Filter
  1. In the previous example, select the second list box.
  2. Set the ibiFilterParent property to list1, which is the ID of the first list box.
  3. Run the application.

    Sales Performance Dashboard in web browser

    Notice that a selection in the first list box also filters the contents of the second list box. A selection in the second list box concatenates the condition of list box 1 and list box 2.


WebFOCUS