ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
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
HActivateAutoFilter (Function)
In french: HActiveFiltreAuto
Native Connectors (Native Accesses)Available only with this kind of connection
Enables an automatic filter on the linked data files when browsing an XML file. This filter can be disabled by HDeactivateAutoFilter.
Caution: This function is only available for the Native XML Connector.
Example
// Enable all the possible automatic filters on the Customer data file
HActivateAutoFilter(Customer, "*" )
// except between Customer and Order data files
HDeactivateAutoFilter(Customer, Order)
 
/////////////////////////////
 
// Browse orders
HReadFirst(Order, OrderID)
WHILE NOT HOut()
// Browse order lines of current order
HReadFirst(OrdLine, OrderID)
WHILE NOT HOut()
HReadNext(OrdLine, OrderID)
END
// Next order
HReadNext(Order, OrderID)
END
Syntax
<Result> = HActivateAutoFilter(<Browse data file> , <Data file to filter>)
<Result>: Boolean
  • True if the filter is enabled,
  • False if an error occurred (file or item not found).
<Browse data file>: Character string
Name of the data file used for the browse.
This parameter can correspond to "*". In this case, all the possible automatic filters will be enabled.
If <Browse data file> and <Data file to filter> correspond to "*", <Result> is set to True and no filter is enabled.
<Data file to filter>: Character string
Name of the data file to filter when positioned in the browse data file.
This parameter can correspond to "*". In this case, all the possible automatic filters will be enabled.
If <Browse data file> and <Data file to filter> correspond to "*", <Result> is set to True and no filter is enabled.
Remarks
Let's see a simple example:
HActivateAutoFilter(Parent, Child)

This code indicates that the records in the Child data file are browsed according to the current 'context' (node) of the Parent data file: all 'Child' of the current 'Parent' will be browsed.

HDeactivateAutoFilter(Parent, Child)

This code indicates that the previous filter is not enabled: The Child data file will be browsed independently of Parent. This means that all the records of Child will be browsed in the given child.
HActivateAutoFilter is used to enable/disable the hierarchical link between Parent and Child during browse operations.
Component: wd300hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/31/2024

Send a report | Local help