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.
- Independent
- Nested
- Linked
In this topic, you will work with the different kinds of filter
controls.
- You can use two or
more controls as independent filters. Data is filtered based
on the selection of one control only. In other words, the applied
filter will be the selected values from one and only one of the
filter controls. Prior selections will be reset.
- Two or more list
boxes are nested if a selection from one of them filters not
only the data, but also the contents of related list boxes. For
example, by selecting a REGION, the STATES are limited to only those
located in the selected REGION.
- Two or more filter
controls are linked if selections from any of them are concatenated,
that is, the conditions are joined with an AND operator and applied simultaneously.
If two filter controls are linked, the applied filter is a concatenation
of the two values. For example, if you select REGION = NORTHEAST,
only records for the Northeast will be displayed. If you then select
CATEGORY = COFFEE, then the applied filter is (WHERE REGION = NORTHEAST
AND CATEGORY = COFFEE).
If there are more linked controls, each
subsequent selected value will be added to the prior filters. While
the data is filtered, the contents of the filter controls are not.
In other words, the CATEGORY list box will display all categories
and the selection will be highlighted. The REGION list box will
display all regions and the selection will be highlighted.
You can link a filter control to a nested filter control.
In this case, both the linked condition will be applied and the
filtering within the nested controls will be applied.
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.
-
Create another
panel on the first tab using the instructions in Binding a Procedure to the ibiDataGrid Using Custom Components.
-
Position
the panel to the left of the grid, as shown in the following image.
-
Set the
background color to #c0c0c0.
-
Set the
title to Select Region.
-
Drag and
drop the ibiList component onto the new panel.
-
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
-
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.
x
Procedure: How to Create an Independent Filter
-
Copy the
panel for the first filter and paste it on the same tab.
-
Position
the panel between the first list box and the grid, and adjust its size.
-
Delete the
list box that is already inside the panel (it was carried over by
the Paste operation).
-
Insert a
second list box and assign the list2 value to the ID.
-
Set title
to Select State, and set ibiColumn to ST.
-
From the
MAIN01 grid, select the ST (State) column.
-
Run the
application.
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.
x
Procedure: How to Create a Nested Filter
-
In the previous
example, select the second list box.
-
Set the
ibiFilterParent property to list1, which is the ID of the first
list box.
-
Run the
application.
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.