Advanced Editor for Advanced Filtering

162 views
Skip to first unread message

André Bonhôte

unread,
Mar 7, 2019, 10:23:47 AM3/7/19
to MyLifeOrganized
Hi all

I still don't get how the "Setup Advanced filtering" dialog is supposed to work (Windows). Let's say, I want to create a rule like this (SQLish notation):


( dueDate <= today OR startDate <= today OR starred = true ) AND hasNextReview = false



I learned that the booleans work with siblings, not with childs (as I initially thought), that means I would have something like this


AND
   dueDate
<= today OR
   startDate
<= today OR
   starred
= true OR
hasNextReview
= false AND



Now, assuming this is correct - how do I easily add this to the advanced filter dialog?

First attempt: "Add sub-rule"
Nothing happens at all.

Second attempt: "Add rule" (let's start from the bottom): 

[X] NextReviev - does not exist - AND



Fine, now the next block is not a rule, it's rather a set of sub rules. When I click "Add sub-rule", it will behave weirdly:

[X] >
   
[X] .... (empty)



Where has my "NextReview" line gone? I can try to revert and delete the empty sub-rule, but that doesn't work. All I can do is delete all rules and start from scratch. Pretty cumbersome. 

I solved this by exporting the rules, sending them to my android device, editing there (it's better but still bad), sending it back to my windows device, noticing that the rule doesn't work. In the end I opened the XML and modified it by hand.

Cumbersome, IMHO.

In another post I saw Stéph write something that looks very similar to my pseudo code snippets. 

Are there activities ongoing to improve this? Some kind of pseudo code like remember the milk offers would be awesome. I must admit that this is the only part of MLO I really hate. It could be so powerful and is such a nightmare to use. It's really frustrating.

Cheers

André

PS: On my 4K screen I can only guess what the filters mean

Stéph

unread,
Mar 7, 2019, 12:00:43 PM3/7/19
to MyLifeOrganized
Hello André. 
It's me - thanks for the name-check!

You've spotted the oddity with adding a set of subrules. When you click "Add subrule", it effectively changes your current rule into the open-bracket to group your subrules, wiping out any parameters you'd started entering into that rule. The thing to do is always click "Add rule" just before you click "Add sub-rule".

So, if you want to add your rules in the order you first wrote them in your post, start by clicking "Add rule" (which is going to be your opening bracket), then click "Add sub-rule" (to start entering the first of the three rules inside your brackets).

When you've entered the three sub-rules (by clicking "Add-rule" each time for the second and third sub-rules, you'll want to add your final top-level rule (the one outside the brackets). If you just click "Add rule" where you are, it will add it as a fourth sub-rule, within the brackets. To get back to the top level in the tree (same as if you're adding tasks and sub-tasks in the MLO outline), you need to click on the AND at the top of the list (the open bracket, which is the only item at the top level in the hierarchy) and select "Add rule".

That's a bit hard to read, so I'll try and explain it more graphically:


1)    AND [add this grouping for the next three subrules by clicking "Add rule", but don't bother putting any criteria into the rule. We just want the "AND"]
1.1)   dueDate 
<= today OR [Line 1.1 appears when you're on line 1 and click "Add subrule"]
1.2)   startDate <= today OR [Line 1.2 is created by clicking "Add rule" when you've finished editing the criteria for 1.1]
1.3)   starred 
= true OR [Line 1.3 is created by clicking "Add rule" when you've finished editing the criteria for 1.2]
2) hasNextReview 
= false AND [To create a rule which is not another subrule of line 1, you have to go back to selecting line 1 and click "Add rule"]


I hope that helps.
Stéphane

André Bonhôte

unread,
Mar 7, 2019, 12:50:42 PM3/7/19
to MyLifeOrganized
Hi Stéph

"Name-check" needs some explanation ;-)

Thanks a ton for your explanation. It works, but it's far from intuitive. I think you agree that some improvements here would be awesome - like I said: some kind of query language, or at least the possibility to move things around.

Anyway, it works for the time being. I hope I don't have to change this filter set one day ;-)

Cheers

André

André Bonhôte

unread,
Mar 7, 2019, 12:50:42 PM3/7/19
to MyLifeOrganized
Edit to my previous post: moving is possible!


Am Donnerstag, 7. März 2019 18:00:43 UTC+1 schrieb Stéph:

Dwight

unread,
Mar 7, 2019, 2:16:18 PM3/7/19
to MyLifeOrganized
Stéph, brilliant explanation.

André,I believe that the counter-intuitive part of this is just about the grouping and order of operations used to combine multiple criteria. You seem to have a good command of the filters and parameters involved in the construction of individual parameters. I'd like to suggest that after you use this system for a couple of days, it becomes intuitive. If you have ever learned any formal postfix notation such as reverse polish notation I think you will find that this is not that difficult. I think that the one really egregious item is the way that when any rule becomes a parent for subrules, the parent rule's operators and operands if any become hidden. Learn that one thing and then the rest of it is just a slightly idiosyncratic version of postfix.

-Dwight

ps "name-check" means that you mentioned Stéph's name in your original post, helping to draw attention to his excellent explanations of MLO.
-d

Dwight

unread,
Mar 7, 2019, 4:07:52 PM3/7/19
to MyLifeOrganized
One more thought: André, have you tried running MLO on your phone? The filter editor on that platform is newer and easier to use; views built on the phone can be exported and then imported to your computer.

André Bonhôte

unread,
Mar 8, 2019, 3:15:39 AM3/8/19
to MyLifeOrganized
Hi Dwight

Back in the days, 25 years ago, I used to hack things in my HP48SX, RPN rocks :-) I think it wouldn't be that much of an effort to improve this dialog. 

Cheers

André

PS: Yes, I did the Android App step, works better
PPS: Being a software developer myself, I know how hard it is to fit all the needs of your customers

Lucas D

unread,
Sep 13, 2024, 11:14:46 AM9/13/24
to MyLifeOrganized
Thanks, Stéph, for this explanation! I was finding sub-rules very cumbersome, but it seems to work to start by clicking "add rule" and then, before doing anything else, clicking "add sub-rule".
Reply all
Reply to author
Forward
0 new messages