Newbie question: How to write Advanced Filter rule?

269 views
Skip to first unread message

Jennifer Lefeaux

unread,
Jun 4, 2015, 5:59:58 AM6/4/15
to mylifeo...@googlegroups.com
Hello!

I'm experimenting with MLO.  So far I really like it because it seems to offer a lot of DIY customization, which is a good fit for me.

My question is, what are the semantics for writing an Advanced Filter rule?  I get the Boolean principles but am not sure about the details.

I looked for this in the User Manual and in this group but haven't been able to find a general "how-to" kind of guide.  If someone can help me out I'll be forever grateful :).

Basically all I want to do is exclude one single context (Waiting For) from my active list. If there's an easier way to do that, I'd love to know it, but I'll still be curious about the general query language.

Thanks in advance!
Jennifer

pottster

unread,
Jun 4, 2015, 7:02:06 AM6/4/15
to mylifeo...@googlegroups.com
Hi Jennifer,

Excellent choice! I've been using MLO for work and play for years - there's nothing like it.

The quick(ish) and dirty way of doing what you want is to use the Context section of the Filter Pane. Make sure the Operation setting shows a red OR, then click on the (none) context and then shift click on the last context in your list, finally control click on the context you want to exclude. If you use this filter regularly, you can click on the Save View... button.

Advanced filtering is one of the most powerful and unique features of MLO. Unfortunately, it has probably never been documented as fully and clearly as it might have been. I don't have time right now to go into it (volunteers?) but don't be deterred from just experimenting - sometimes it's the best way to learn. I suspect that most of the experienced users here have built up their knowledge by doing just that.

Hope this helps. Good luck.

Dwight Arthur

unread,
Jun 4, 2015, 6:38:07 PM6/4/15
to mylifeo...@googlegroups.com

Hi, Jennifer.


One great thing about MLO is that it's so powerful that there are often several different ways to accomplish something,  with slightly different advantages and disadvantages. The result is not only a lot of power but also a lot of complexity. Remember that you don't need to dive into all of this complexity whenever a simpler answer works for you. I'm going to address four approaches.

 

1. Context filter
This is the approach Ken (Pottster) wrote up. Advantage: this is probably the simplest and easiest to understand. Disadvantage: you haven't technical excluded @waiting as much as you have included everything else.  When you create a new context, it will probably not be in the included list unless you remember to go add it. One More Thing: if you start making several different modifications and custom view you will reach the point where it gets hard to keep track of what mod ytou have made, why, and where you put them. Solution: at the bottom of the left panel find the "save view" button. Try to give the view a name you will easily understand later, like "active minus waiting" but maybe shorter. If this turns out to be a view you use a lot, you should consider creating a tab for it, making this view the default view in the workspace, locking the workspace to the default, setting a reasonable icon for the tab, and pinning the tab.

 

2. advanced filter
I think that this is the approach you specifically asked about. It's really pretty simple. Click the checkbox for "add advanced" and then the "setup" button to bring up the rules window. Your starting point is the view that you had right before clicking "add advanced". The only thing your rules can do is exclude more tasks - they cannot include any tasks that were not in the view when you started. They cannot move any tasks, sort the view, change groups, or anything other than just excluding more tasks. Click the "add rule" button to bring up your first rule. You should get a like that shows you four boxes (the third one is almost invisible) preceeded by a checkmark and followed by three icons. The checkmark simply says that this rule is active. This is helpful if you end up with a complicated set of rules that are not giving the result you wand - you can turn various rules on and off to see where the problem is. Click the second box for a list of all the fields you can filter on. You want Contexts (you could use ContextsText but this is easier). When you click Contexts the second box gets populated with the tests that the Contexts field can use (and also a new button with three dots shows up after the third field). Click in the second box and select "does not contain". Go to the third field and click the three dots to get a list of contexts. Click on 
@Waiting. That's it. If you wanted to add another rule, you would start by making sure that the fourth field had the correct conjunction (OR or AND) and then click the Add Rule button to start the second rule. If you get into more complex conditions like ((context DoesNotContain @Waiting) AND ((StartDateTime OnOrBefore Now) Or (StartDateTime DoesNotExist))) you  will need subrules to express the layers of parentheses. Subrules have a comples counterintuitive structure - when you are ready to learn about them come back and ask again. Anyhow, when you are through click OK and check to see if the view is showing what you want. If so, then save it and name it and consider setting up a workspace for it. Advanced filters can get to be incredibly complex, but that's because your life is incredibly complex. This gives you the power and flexibility to create a view that shows you exactly the tasks you should be working on right now.

 

3. Closed contexts
The problem with both solutions above is that each one eliminates @waiting tasks from just one view.  We have been talking about modifying the 'active actions' view. If you want to eliminate @waiting tasks from the projects view you have to repeat the steps again, and then again for each other view you want to modify. Here's a way to eliminate @waiting tasks from many views at once by using closed contexts.

 

This is originally intended for contexts whose tasks can be worked only at certain times of the day. But the option "always closed" is useful for clearing an entire context and all* of its tasks out of your to-do lists. Press f8 to raise the context window. Find @waiting and highlight it.  On the right side of the window click on a tab called "hours" and then click the checkbox called "always closed". Close the context window and you are done. Back in the context filter that Pottster showed you,  at the bottom of the section there is a checkbox called "include closed". Your @waiting tasks will be excluded from any view where the "include closed" checkbox remains unchecked.

 

*technically,  a task will be excluded only if _all_ of its contexts are closed.

 

4. Self-activating
Once you have excluded the @waiting tasks, what happens next? I'm guessing that each @waiting task is waiting for something, and you have to remember what each one is waiting for and periodically check to see if it has happened yet, and then figure out what the right context should be when it's done waiting, and change to the new context. That sounds like a lot of work that's going to managing tasks rather than getting them done. An alternative would be to stop using @waiting and find some way to actually tie the task to the thing it's waiting for. For example, if there's a bill that you don't want to pay until next month, you could leave the context @bills (or whatever context you would use for a bill you wanted to pay right away) but put a start date of next month. The future start date will keep it off of the active actions view; when the date arrives it will automatically appear on the list alongside of your other bills. Maybe you are waiting for some other task to finish, in which you could create a dependency on the other task. The unsatisfied dependency will keep it off of your active actions list but when the trigger task is completed it will pop onto the view. Maybe you are waiting until you have a chance to go to the hardware store. You could create a context @HardwareStore and the next time you are at the hardware store you could use your iphone or android to associate your current location with the context. Then, whenever you go to the hardware store, the task will pop onto your active actions list (on your phone). If you can set some sort of trigger like these, then you save yourself the effort of managing the task until it's ready.

--
You received this message because you are subscribed to the Google Groups "MyLifeOrganized" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mylifeorganiz...@googlegroups.com.
To post to this group, send email to mylifeo...@googlegroups.com.
Visit this group at http://groups.google.com/group/mylifeorganized.
To view this discussion on the web visit https://groups.google.com/d/msgid/mylifeorganized/f93d7694-625a-449f-8641-717f30437937%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jennifer Lefeaux

unread,
Jul 13, 2015, 3:03:04 AM7/13/15
to mylifeo...@googlegroups.com
Thank you!  Dwight and Pottster, your answers were terrifically helpful.  MLO has a steep learning curve (tradeoff for amazing functionality), and I really appreciate your taking the time to write such detailed answers.  I hope one day to be able to pay it forward :)

I'm embarrassed that I was so late in seeing your replies.  I thought I had enabled a setting to let me know when people replied, but I guess I didn't.  I really thought no one had answered me :-S  Just saw them today by accident.

But to sum up: you guys are the best!

Dwight Arthur

unread,
Jul 13, 2015, 11:22:26 PM7/13/15
to mylifeo...@googlegroups.com
Glad to help. Keep in touch - let us know how far you have gotten in trying out the query language. When you figure out how to do something amazing, don't forget to come back here and share it.
-Dwight

On Monday, July 13, 2015 at 3:03:04 AM UTC-4, Jennifer Lefeaux wrote:
Thank you!  Dwight and Pottster, your answers were terrifically helpful.  MLO has a steep learning curve (tradeoff for amazing functionality), and I really appreciate your taking the time to write such detailed answers.  I hope one day to be able to pay it forward :) [. . .]

Joel Azaria

unread,
Sep 10, 2015, 2:20:03 PM9/10/15
to MyLifeOrganized


On Thursday, June 4, 2015 at 6:38:07 PM UTC-4, Dwight Arthur wrote:

Hi, Jennifer.

 

[SNIP...]

 

Subrules have a comples counterintuitive structure - when you are ready to learn about them come back and ask again. Anyhow, when you are through click OK and check to see if the view is showing what you want. If so, then save it and name it and consider setting up a workspace for it. Advanced filters can get to be incredibly complex, but that's because your life is incredibly complex. 


My life is incredibly complex.  Can I call in that offer for a subrules primer?  I've tried 500 ways and can't get what I want.  Maybe I can articulate it here and you can suggest smth rather than try to go over what I've tried so far.   Here's what I need to end up with:

2 distinct 'sets' of data, 

1st is simple:
Task is *not* HideInToDo and Contexts contains @Job-site

2nd is a bit more:
Caption is any of 'Change Orders, Billables', 'Bring to Jobsite', 'Need for Jobsite'
is not HideInTodo
has subtasks.

Both rules will produce 'hits' on two distinct branches and I want to see them in this one view.
If it matters - Show Actions: All, Show Heir: Yes, Show Completed: Recent


The closest rule set I got so far was:
  •  (not(HideInToDo)) AND
  • > OR
    • (Caption is 'Change Orders, Billables') OR
    • (Caption is 'Bring to Jobsite') OR
    • (Caption is 'Need for Jobsite')
  • >
    • (not(HideInToDo)) AND
    • (Contexts contains @Job-site)
Which works great except that I can't figure out how to filter the folders (selected by Caption above) where there is no subtasks.

Any help appreciated.
Thx.

Dwight

unread,
Sep 10, 2015, 5:28:24 PM9/10/15
to mylifeo...@googlegroups.com
Glad to help,  Joel.

First let me try to be clear on what you are trying to achieve.

You are making a filtered hierarchy.  These can be especially tricky because items you are trying to filter our can sometimes become included because they are parent, or child,  or some kind of cousin to an included item. It's important to keep clear that you are making a flat, filtered list and then adding the included items' parents and children. A good debugging step would be to run the view with hierarchy off,  verify that the tasks (folders) you see are the ones you wanted, and then add the hierarchy back.

I would encourage you to avoid any filters that would select a task and also that task's parent or grandparent in a filtered hierarchy as it's likely to get messy.

I'm guessing that the reason you have hierarchy on is that some of what you are selecting would be folders and you want to see the tasks under those folders.  If that's the case,  I would turn off parent hierarchy and show only the children. This avoids messiness if srveral selected items have the same parent - MLO then has to merge trees and that's when the cousins start showing up.

Next question,  it's clear that if a folder has one od the three captions you specified, you want the folder and its subtasks. Is this true regardless of the context of the subtask? And if a task has the @jobsite context and has subtasks, do you want to see them or not, and does it depend on the context of the subtasks?
-Dwight
Mlo betazoid on Android sgn2

--
You received this message because you are subscribed to the Google Groups "MyLifeOrganized" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mylifeorganiz...@googlegroups.com.
To post to this group, send email to mylifeo...@googlegroups.com.
Visit this group at http://groups.google.com/group/mylifeorganized.

For more options, visit https://groups.google.com/d/optout.
-Dwight
Mlo betazoid on Android sgn2
-Dwight
Mlo betazoid on Android sgn2
-Dwight
Mlo betazoid on Android sgn2

BOC

unread,
Sep 16, 2015, 6:59:26 PM9/16/15
to MyLifeOrganized
@Joel Azaria 

If I understood correctly, try the attached rule (see image):

Give me everything that has the context @Job-Site and isn't hidden

OR

Give me the folders with these specific names that only have open subtasks

P.S. It seems MLO treats folders as uncompleted subtasks which to me is a bug.  So if you have nested folders, you will always see the main folder in this view.

Advanced Filter.jpg

Joel Azaria

unread,
Sep 20, 2015, 1:16:51 PM9/20/15
to MyLifeOrganized
Hey Dwight, BOC,

Thanks for replies.   Sorry getting back so late, must have missed the notifications or losing my mind, because I also thought I posted my solution here.  I tweaked on it for a while longer and came up with this below which gives the results I wanted.  Not sure if BOC's solution works - didnt' try.

Thanks for the assist anyway guys.  Appreciated.

My solution:

beefh...@gmail.com

unread,
Jul 3, 2018, 10:08:54 AM7/3/18
to MyLifeOrganized
I thought I'd put on a belated post here for anyone like myself who was grappling with the logic of advanced filters. I finally think I understand them, and how the logic works. The OP mentions they understand the boolean logic here, but i'll reiterate the golden rule that cleared it all up for me:

The operators (NOT/AND/OR etc) relate to SIBLING items, not CHILD items.

I was working previously on what seemed intuitive - that logic was on child items.

So whereas if you want conditions A or B or C and X or Y or Z I thought you'd do:

>AND
>OR
A
B
C
 >OR
X
Y
Z

MLO acts maddeningly when you try to achieve this and it all seems like black magic with operators popping up seemingly randomly. However, once you understand that LOGIC OPERATORS APPLY TO SIBLINGS then you see you'd achieve it by doing:

>AND
A OR
B OR
C
>
X OR
Y OR
 
So you can see that line 1 (which uses AND) has a sibling on line 5 and this is the line under which the logic operates. Therefore results of both of those rules (or their sub-rules) will be positive.

Hope this helps someone! 

On Thursday, 4 June 2015 10:59:58 UTC+1, Jennifer Lefeaux wrote:
Reply all
Reply to author
Forward
0 new messages