PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Filter property and browsing Table controls
  • Handling the browsing Table, List Box, ListView, Combo Box and Looper controls via the properties
  • Modifying the properties used to browse a browsing Table, List Box, ListView, Combo Box or Looper control
  • Limit
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
..Filter is used to find out and modify the filter used to display records in:
  • the browsing Table controls,
  • the browsing TreeView Table controls,
  • the browsing List Box controls,
  • the browsing Combo Box controls,
  • the browsing Looper controls.
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).
Notes:
  • To use a filter on a composite key, we recommend that you call HFilter.
  • ..Filter cannot be used to identify the user filters (defined by TableEnableFilter 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 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 was defined by ..Filter or in the window or page editor (in the control description). This control must be a:
  • Browsing List Box or ListView control,
  • Browsing Combo Box control,
  • Browsing Table or TreeView Table control,
  • Browsing Looper control.

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 a:
  • Browsing List Box or ListView control,
  • Browsing Combo Box control,
  • Browsing Table or TreeView Table control,
  • Browsing Looper control.
<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 browsing Table controls

For browsing Table controls, the Check Box "Also filter the file (HFilter)" is used to keep the search and sort options on the filtered columns (magnifier, etc.).For browsing Table controls, 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 the option "Also filter the file (HFilter)" is checked: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. Next time the data file associated with the control is browsed, it 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 browsing List Box, Table, Combo Box or Looper control come from the data file or from the query specified by ..BrowsedFile.
  • The sort direction is defined by ..BrowsedItem.
  • The records can be filtered by ..Filter or by HFilter. Caution: ..Filter can only be used to implement a "Starts with" filter on the search key.

Modifying the properties used to browse a browsing Table, List Box, ListView, Combo Box or Looper control

To modify several properties (..BrowsedItem, ..Filter and ..BrowsedFile), we advise you to:
  1. Stop the browse by assigning an empty string ("") to ..BrowsedFile.
  2. Modify the relevant properties.
  3. Restart the browse with ..BrowsedFile.
This method is used to optimize the modifications performed. Indeed, each one of the modifications performed individually restarts the browse. These operations can become quite slow when they are performed on large files.

Limit

..Filter only applies to the controls found in a window or in a page. This property only applies 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.
Minimum version required
  • Version 9
This page is also available for…
Comments
Exemplo Filter
Table_Cliente..Filter = combo_Representante

// Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/11/aula-967-windev-tabela-034-filter.html

https://www.youtube.com/watch?v=mVDSgbWqcxU

De matos
04 Dec. 2016