PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Exclude values in a filter
Exclude values in a filter
Started by Volker Gericke, Feb., 25 2024 2:52 PM - 2 replies
Posted on February, 25 2024 - 2:52 PM
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
Registered member
1 message
Posted on February, 27 2024 - 6:00 AM
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.
Posted on February, 27 2024 - 7:15 PM
Thank you Katherine, that‘s really cool. :)