ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / HFSQL properties
  • Filter property and Table controls based on a data file
  • Manipulation of Table, List, Image List, Combo and RepeatString fields using file 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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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,
  • Combo Box controls based on a data file,
  • Looper controls based on a data file.
This filter (if it exists) can be defined during the control description ("Content" tab).
This filter (property Filter or filter entered 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 Table controls based on a data file, 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 à chaque modification d'un champ Combo
// Mise à jour des éléments du champ Combo en fonction
// des lettres saisies dans le champ de saisie du champ Combo
COMBO_Elément.Filtre = COMBO_Elément
// Identifie la condition de filtre sur la clé de parcours Ville
IF TABLE_Client.Filtre = "" THEN
	TABLE_Client.Filtre = "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 the field for which you want to know the current filter: this filter has been defined either by the Filterproperty, or directly in the window or page editor (in the field description).. The type of this control must be:
  • List or List image file,
  • File combo,
  • 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. The type of this control must be:
  • List or List image file,
  • File combo,
  • 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.

Manipulation of Table, List, Image List, Combo and RepeatString fields using file 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. Warning: the Filter property only allows "Starts with" filtering on the route 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:
  • List Box control based on a data file,
  • List Box control based on a data file,
  • Browsing Combo Box control,
  • Table based on a data file field,
  • Looper control RepeatString file field,
  • 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: 09/21/2024

Send a report | Local help