PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Exclude values in a filter
Exclude values in a filter
Débuté par Volker Gericke, 25 fév. 2024 14:52 - 2 réponses
Posté le 25 février 2024 - 14:52
Hi,

The more I practice, the better the results... What a surprise! :-)

I can INclude values in a string-based filter:
File.Filter("Name ~]' aaa ' OR Name ~] ' bbb '")
LOOP_File.Display()

This includes only records which contain a substring "aaa" or "bbb" surrounded by spaces.

I cannot find how to invert that - how to EXclude those records.

Any idea?

Kind regards,

Volker
Membre enregistré
1 message
Posté le 27 février 2024 - 06:00
Certainly! To exclude records that contain a substring "aaa" or "bbb" surrounded by spaces, you can use the NOT operator (~]!) along with the OR operator. Here's an example: https://www.catneedsbest.com/

windev
File.Filter("NOT (Name ~]' aaa ' OR Name ~] ' bbb ')")
LOOP_File.Display()

This filter will retrieve records where the Name does not contain "aaa" or "bbb" as substrings surrounded by spaces. The NOT operator negates the conditions specified within the parentheses.
Posté le 27 février 2024 - 19:15
Thank you Katherine, that‘s really cool. :)