Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 7 Monaten
Letzter Beitrag:
vor 2 Jahren, 7 Monaten
Beteiligte Autoren:
Aad Gouka, Allard, Stefan Bentvelsen, DarrenF, Al

Using hFilter.

Startbeitrag von Aad Gouka am 19.11.2015 15:11

Hi all,

I am in a bit of a struggle with hFilter. I want to add Datedifference(xxx,xxx,) to the next filter:


Anybody who's willing to help me out here.

Much obliged.

Best regards,



complains of an offerte over a certain amount of time? Is that what you want?


von Allard - am 19.11.2015 21:02
Hi Allard,

hFilter is not the user friendliest function in Windev but you can certainly do a lot with it if you know how to use it.
I want to see a list of estimates older than 30 days, that's all :-)

Best regards,


von Aad Gouka - am 19.11.2015 23:23
Hi Aad,

You said it... HFilter is not the easiest function to use. I too started off using HFilter but very soon came to the conclusion that for complex requirements it was just too cumbersome. I no longer use HFilter for anything. Instead I use Queries as they can do everything I need, especially for more complex requirements! :cool:

There are a few "techniques" you need to know about (like resetting parameters, using Null parameters etc.), when using queries in WX but once you know them (and they've been discussed at length and in great detail in previous posts on this forum), then you're good to go :spos:

Something like?

SELECT ID,EstimateDate,EstimateAmount FROM Estimate WHERE EstimateDate > {Param_Date};

Where Param_Date is a date with 30 days added and passed to the query.

von DarrenF - am 20.11.2015 00:02
Hello Add

I have never figured out the Hfilter() syntax so I always use the wizard and this is the code it generates for a date comparison on one of my files.

sBrowseKeyItem is string
// Enable the filter
sBrowseKeyItem = HFilter(Crtrans, "DataEntryDate>='"+StartDate+"'"...
+" AND DataEntryDate

von Al - am 20.11.2015 03:00
Hi Aad,

there should be no need to use DataDifference() in HFilter(). You can first calculate the date to use for filtering (i.e. current date -/- 30 days) and use this date in the way as Al wrote. Or something like

HFilter(Klachten,"Offerte='"+Offertenummer+"' AND InvoiceDate

von Stefan Bentvelsen - am 20.11.2015 07:42
Hi Aad

As DarrenF stated why not use queries?

I use them a lot. It works like a charm. Especially for filtering stuff. For instance the dates. Just select a parameter and a begin and end date and you are good to go.

I have a search screen in my app that allows for searching on almoast everything. It uses a ton of parameters but only actually uses a param when it is needed.

I use internal queries if possible. ( on controls ) If it is just code I use queries to do the creation of a particular data set in code. When a querie is run you can use it like if it was a file works great. It simplifies the code


von Allard - am 20.11.2015 09:44
Hi guys,

Thanks for all your suggestions. In the meantime I have a working solution the old way, like Al and Stefan suggested.

HFilter(Klachten,"Offerte='"+Offertenummer+"' AND KlachtUitgevoerd = ''"+" AND Gemelduitvoerder

von Aad Gouka - am 20.11.2015 14:27
Hi Aad,

Yes way easier. And indeed verry easy to get the hang of it. You will be doing yourself a big fafour if you look into the matter.


von Allard - am 20.11.2015 14:54
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.