PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Filter
  • Filtered browse
  • Enabling/Disabling a filter
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
Defines and enables a "Contains" filter on a data file, view or query. The "Contains" filter is used to select all the records containing a specific set of characters.
This filter is not case sensitive.
This filter does not use any index, it browses the entire data file.
Versions 18 and later
WEBDEV - Server codePHP This function is now available for the PHP sites.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
WEBDEV - Server codePHP This function is now available for the PHP sites.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
WEBDEV - Server codePHP This function is now available for the PHP sites.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
SearchKey is string = HFilterContains(Customer, Comment, "VIP")
HReadFirst(Customer, SearchKey)
WHILE NOT HOut()
Trace(Customer.CustomerName, Customer.City)
HReadNext(Customer, SearchKey)
END
// Disables the filter
HDeactivateFilter(Customer)
Syntax
<Result> = HFilterContains(<File Name> , <Item Name> , <Value>)
<Result>: Character string
Search item. Corresponds to:
  • the name of item used to browse the data file if the filter is enabled,
  • an empty string ("") if the filter cannot be implemented.
<File Name>: Character string (with or without quotes)
Name of HFSQL data file, view or query used.
<Item Name>: Character string (with or without quotes)
Name of item on which the filter will be implemented. This item can be a key item or a non-key item.
<Value>: Character string (with quotes)
Value that must be found in the record item.
Remarks

Filter

  • The filter is enabled as soon as HFilterContains is called.
  • Equivalent syntaxes:
    HFilterContains(FileName, ItemName, "Value")

    is equivalent to:
    HFilter(FileName, "ItemName ~]'Value'")

Filtered browse

When a filter is defined and enabled on a data file, any record read corresponds to the filter. If no other record corresponds to the filter during the browse:
  • HOut returns True.
  • the current record corresponds to the last record read with the filter.
For example:
On a filtered data file, after the function:the current record is:
HReadFirstthe first file record corresponding to the filter
HReadLastthe last file record corresponding to the filter
HReadNext (or HForward)the next record (or the next nth record) corresponding to the filter
HReadPrevious (or HBackward)the previous record (or the previous nth record) corresponding to the filter

Enabling/Disabling a filter

  • HDeactivateFilter is used to disable a filter.
  • HActivateFilter is used to re-enable a filter.
  • The filter is deleted when the data file (query or view) is closed (HClose or HOpenAnalysis for example).
  • A single filter can exist at a given time on a data file (query or view). If HFilterContains is used several times, only the last filter will be taken into account: the previous filters will be deleted. Similarly, if several filters are used (HFilter* functions), only the last filter will be taken into account.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Windows Mobile wp230hf.dll
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment