Page 1 of 1
Filter Syntax: Result for Boolean AND depending on the sequence of the criterias?
Posted: 26 Sep 2022 11:31
by schindi
I combined 2 of the available examples for the power filtering with a Boolean AND:
version 1:
ageM: d AND !attr: d
version 2:
!attr: d AND ageM: d

- Filter_Settings.png (52.3 KiB) Viewed 1148 times
Directory content:

- directory_content.png (101.14 KiB) Viewed 1148 times
Expected filtering result: Files modified today --> in this example: XYplorerHelp_23.60.pdf
But the filtering results are dependent on the sequence of defined criterias and both still contain a directory.
v1:

- Filter_result_v1.png (11.54 KiB) Viewed 1148 times
v2:

- Filter_result_v2.png (96.95 KiB) Viewed 1148 times
Am I doing something wrong in the syntax or is there a bug?
Re: Filter Syntax: Result for Boolean AND depending on the sequence of the criterias?
Posted: 26 Sep 2022 11:59
by LittleBiG
The first one doesn't contain folder here, so I cannot confirm.
The starting "!" or "NOT" will revert the whole filter. Use this to achieve what you want (in v2): attr: NOT d AND ageM: d
Re: Filter Syntax: Result for Boolean AND depending on the sequence of the criterias?
Posted: 26 Sep 2022 12:03
by admin
This might shed some light on it:
Code: Select all
v22.20.0222 - 2021-09-24 15:10
+ Visual Filters and Live Filters: Now, by factory default, you can invert a
whole Boolean expression ("master-invert") by wrapping it into parentheses
and prefixing a !:
Example: Size: 529 KB | Name:*.txt = Size OR Name
Master-Inversion: !(Size: 529 KB | Name:*.txt) = NOT (Size OR Name)
That way you can use a mere ! to just invert the first part of the expression:
Example: !Size: 529 KB | Name:*.txt = (NOT Size) OR Name
> UPGRADERS: To prevent breaking old code a tweak is auto-set for upgraders
that keeps it as it was before:
VFAllowMasterInvertOldWay=1
The old way:
!Size: 529 KB | Name:*.txt = NOT (Size OR Name)
!(Size: 529 KB | Name:*.txt) = NOT ("(Size" OR "Name)") (= total rubbish)
It is recommend that you update your scripts and set
VFAllowMasterInvertOldWay=0 to enjoy the benefits of the new syntax.
Re: Filter Syntax: Result for Boolean AND depending on the sequence of the criterias?
Posted: 26 Sep 2022 12:37
by LittleBiG
admin wrote: ↑26 Sep 2022 12:03
This might shed some light on it:
Or that.
I still had the VFAllowMasterInvertOldWay set to 1.
Re: Filter Syntax: Result for Boolean AND depending on the sequence of the criterias?
Posted: 26 Sep 2022 13:26
by schindi
Thanks for your explanations to clarify my topic.
Many amazing possibilities but also details you struggle with, even if you just try to combine two examples with AND.