ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / HFSQL properties
  • Filter property and Table controls based on a data file
  • Handling the browsing Table, List Box, ListView, Combo Box and Looper controls via the properties
  • Modifying the properties used to loop through a Table, List Box, ListView, Combo Box or Looper control based on a data file
  • Limit
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Filter property is used to identify and change the filter applied to records in:
  • Table controls based on a data file,
  • browsing TreeView Table controls,
  • List Box controls based on a data file,
  • browsing Combo Box controls,
  • Looper controls based on a data file.
This filter (if it exists) can be defined during the control description ("Content" tab).
This filter (Filter property or filter defined in the editor) has the following characteristics:
  • "Starts with" filter.
  • applies to the search item only.
  • affects the object used (Table, Combo Box, List Box or ListView control)
  • does not affect the data file on which the object is based (except for the browsing Table controls, see below).
Remarks:
  • To use a filter on a composite key, use HFilter.
  • The Filter property cannot be used to identify filters defined by the user (with the TableEnableFilter function, for example).
Example
// - Code whenever a Combo Box control is modified
// Update elements of the Combo Box control according to
// the letters entered in the edit control of the Combo Box
COMBO_Element.Filter = COMBO_Element
// Identifies the filter condition on the City search key
IF TABLE_Customer.Filter = "" THEN
TABLE_Customer.Filter = "PARIS"
END
Syntax

Finding out the filter defined on the search item Hide the details

<Filter value> = <Control used>.Filter
<Filter value>: Type of filter
Current value of filter defined on the search item. This filter is a "Start with" filter.
<Control used>: Control name
Name of control whose current filter is requested: this filter is defined by the Filter property, or in the window or page editor (in the control description). This control must be of the following type:
  • browsing List Box or ListView,
  • browsing Combo Box,
  • browsing Table or TreeView Table,
  • Looper based on a data file.

Modifying the filter defined on the search item Hide the details

<Control used>.Filter = <New filter value>
<Control used>: Control name
Name of control whose current filter will be modified. This control must be of the following type:
  • browsing List Box or ListView,
  • browsing Combo Box,
  • browsing Table or TreeView Table,
  • Looper based on a data file.
<New filter value>: Type of filter
  • New value for the filter defined on the search key,
  • Empty string ("") for no filter.
Remarks

Filter property and Table controls based on a data file

For Table controls based on a data file, the Check Box "Use HFilter to browse the file" is used to keep the search and sort options on the filtered columns (magnifier, etc.).
If "Use HFilter to browse the file" is checked:
  • the property is not applied to the Table control only but it is also applied to the data file onto which the control is based. Therefore, a browse performed on the base file of the control will be filtered.
  • A filter (HFilter) is automatically applied to the data file onto which the Table control is based.
  • If a filter is defined on the data file (HFilter) BEFORE displaying the Table control (TableDisplay for example), only the filter of the Table control will be taken into account. Then, the data file will be browsed according to the filter of the Table control.

Handling the browsing Table, List Box, ListView, Combo Box and Looper controls via the properties

  • The records displayed in a List Box, Table, Combo Box or Looper control based on a data file come from the data file or query specified with the BrowsedFile property.
  • The sort direction is defined by the BrowsedItem property.
  • The records can be filtered using the Filter property or the HFilter function. Caution: the Filter property can only be used to apply a "Starts with" filter on the search key.

Modifying the properties used to loop through a Table, List Box, ListView, Combo Box or Looper control based on a data file

To modify several properties (BrowsedItem, Filter and BrowsedFile), it is recommended to:
  1. Stop the iteration by assigning an empty string ("") to the BrowsedFile property.
  2. Change the relevant properties.
  3. Restart the iteration with the BrowsedFile property.
This method is used to optimize the modifications performed. Each one of the modifications made individually restarts the iteration. These operations can become quite slow when they are performed on large files.

Limit

The Filter property applies only to controls in a window or page. This property applies only to the following controls:
  • Browsing List Box control,
  • Browsing ListView control,
  • Browsing Combo Box control,
  • Browsing Table control,
  • Browsing Looper control,
  • Browsing TreeView Table control.
Component: wd300.dll
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help