The GEN:FieldFilter tag is used to filter a table of records based on the value of a field. The field filter can be bound to a database field of any type including a date field. Applying a filter to a database table displays a subset of the database sorted and displayed in a particular way. For example, the table control displaying the filtered data could contain a subset of records, such as "products that are in stock", or "customers that have purchased goods greater than $1000". A table control could also contain a subset of the information for each item, such as "product name, description and price", but not the dimensions of the product.
|
|
A dropdown list filter selects an Employee name. |
Similarly, the order of the columns is specified in the filtered table control as well. In summary, a filter limits the records displayed, and for each table control, you can control which columns are displayed, what order they are displayed in, how wide each column is, how the data is sorted, and what types of records to display.
The filter type displayed depends on the field type:
|
Field Type |
Filter Generates |
|
Credit Card Exp. Date |
Date filter with one field and a “Go” button. |
|
Currency |
Numeric filter with one field and a “Go” button. |
|
Date |
Date filter with one field and a “Go” button. The calendar date picker will be displayed for a date filter control if the filter is bound to a field whose type is Date and if the Ignore Time checkbox is selected on the Bindings tab of the Properties dialog. If the Ignore Time checkbox is not selected, then the date picker is not displayed. |
|
Decimal Number |
Numeric filter with one field and a “Go” button. |
|
Number |
Numeric filter with one field and a “Go” button. |
|
Percentage |
Numeric filter with one field and a “Go” button. |
|
All other fields |
Field selection filter (dropdown combo box). The dropdown filters filter immediately when changed and do not have a Go button |
You can specify the control type for the FieldFilter to be as a dropdown or a text box. If a dropdown is specified, the list of current values will be displayed in the dropdown. The current values are all the values that are in the current query including items that are displayed on subsequent pages. If a text box is specified, the application user can type a text value in the text box. You can also specify the operator to use to compare the text value specified in the text box. For example, to search for any names starting with the typed text string, specify the operator as “begins with”.
This tag requires a binding between it and another control, typically the table that it modifies. You must manually hook up the control to the table in the Properties dialog.
The fields displayed in the FieldFilter are not required to be displayed in the table shown to the user.
<GEN:FieldFilter Name=”StartDate”/>
FieldFilter Display Properties
FieldFilter Binding Properties
FieldFilter Pass-Through Attributes