Page 1 of 1

Visual Filter on Extra Column of date format

Posted: 31 Mar 2021 22:33
by aubrey97
I have Extra5 defined as type Date with Name Due

I figured out that dates entered as say 4/4/2021 display the same as those entered as 2021-04-04 but I have all mine entered in the format
2021-04-04

I would like, if possible to do a visual filter to exclude all dates beyond (or prior to and including) a particular day.

Have been struggling with various syntax none of which seems to work.
Something like due: 2021* does work as a simple text search but that is clearly not what I want
likewise ex5: something

Any help with syntax appreciated please. Some way of filtering everything out after today would also be good to avoid having to manually enter the date.

I tend to use quickfilters less often so that would be less desirable but I'd like to know how to do that as well if possible

Re: Visual Filter on Extra Column of date format

Posted: 01 Apr 2021 22:51
by highend
Not possible via a simple visual filter...

Would need scripting (report() + eval all operators -> result (+ inverting if used with ! (boolean not))

Re: Visual Filter on Extra Column of date format

Posted: 02 Apr 2021 11:52
by aubrey97
Thank you - good to know the limits of possibility.

Seems to me it would be an incredibly useful thing to be able to do somehow, whether by Visual filter or otherwise - to easily filter (or quicksearch) a large selection of files/folders by some sort of assigned threshold or due date. A bit like the todo.txt philosophy but for files.

I think I am correct in thinking that whatever data format is assigned to information in the tag database/ex1... etc (Numeric, date, stars) quicksearch will only see it as a text field, so could not do a search by date as if it is a number (if entered as 20210322 for example)? And even for that it would only be a simple wildcard search, not regex (for example something like Downloads?ex5:202[2|1]-[04|03]-[31] /r doesn't seem to do anything useful.
So even for other stuff like stars you cannot quicksearch for stars > 3 only for stars exactly equal to 3 - without doing something like

Downloads?ex3:5;4;3

That seems quite a limitation on the easy usefulness of the tagged data

Anyway this would be beyond my capability without help, but perhaps it will spark some ideas in someone.

Re: Visual Filter on Extra Column of date format

Posted: 02 Apr 2021 12:22
by highend
Ofc quicksearch supports regex but your regex wouldn't find anything useful (ranges vs. groups)
It requires a lot of typing anyway...
This one can filter by a simple yyyy-mm-dd date, with
01. = (can be left out)
02. >=, >, <=, <
03. And the logical not (!)

It doesn't support ranges and I'm not planning to add something like that...

Re: Visual Filter on Extra Column of date format

Posted: 02 Apr 2021 20:17
by aubrey97
Wow that looks interesting thank you. It seems to work but not sure how.

Why does it put the text
"Windows benchmarking with scores from all machines"|"windows95-2.2.1-win32-standalone-x64"

into the live filter box. That text seems critical because if you clear it the filter is cleared.

Re: Visual Filter on Extra Column of date format

Posted: 02 Apr 2021 20:31
by highend
Because it filters the list. If you don't like it, remove the +8 in line 61 and it reverts to a normal visual filter

Re: Visual Filter on Extra Column of date format

Posted: 02 Apr 2021 21:21
by aubrey97
Love it. :D
Sent a small PayPal gift (within limits of my affordability anyway)

Re: Visual Filter on Extra Column of date format

Posted: 12 Jun 2021 17:02
by wenmin92
Well, the script is powerfull, but not handy.
What if I want to filter a date, star, and other extra columns at the same time? Yes, we can write a script for every single extra column and execute each of them in turn, but if I want to change the filter, I have to resest and execute every filter script again which is a little cumbersome.
Moreover, in this way, we cannot take advantage of Power Visual Filter.

Re: Visual Filter on Extra Column of date format

Posted: 12 Jun 2021 17:11
by highend
And? I wrote that script to solve that specific problem. You are free to extend it or write a completely new one...

Re: Visual Filter on Extra Column of date format

Posted: 12 Jun 2021 17:18
by wenmin92
highend wrote: 12 Jun 2021 17:11 And? I wrote that script to solve that specific problem. You are free to extend it or write a completely new one...
I’m sorry if I offended you. Your script is useful and solved the problem.
I just hope that Visual Filter can natively support this feature.
Even simple string comparison is meaningful, so that the date and number comparison with consistent format can be realized indirectly.