This is an advanced topic!  If you can't figure out how to accomplish what you want to do, just contact us and we'll get you sorted.

Overview

The Advanced filter allows you to filter and combine various properties by inputting a special filter description in Reverse Polish Notation.

You can add an Advanced filter by scrolling to the bottom of the Smart List dialog and clicking Advanced.  Choose "matches..." in the dropdown menu and you will be shown some examples and prompted to enter a filter description.

Advanced filter descriptions are made up of expressions and operators.  An example expression is @quick  meaning tasks/projects with the label "quick", and an example operator is ||  meaning OR, as in show tasks/projects having one label OR another (or both).

Whereas you might expect the operator to be placed between the expressions (@quick  OR @easy), in RPN the operator is placed after the expression.  

This makes it easier for Marvin to understand exactly what you mean without needing parentheses in more complicated filter descriptions.

So here's an example:

@quick @easy ||

which shows tasks/projects that are quick or easy or both.  If you want to match tasks/projects that are quick or easy or simple, then it would look like:

@quick @easy || @simple ||

think of it as ((@quick OR @easy ) OR @simple) and then put the operators after the expressions, in this case @simple is one expression and @quick @easy ||  is a compound expression.

Supported Operators 

The supported operators are:

  • || OR -- In A B || , check if A  is true or B  is true (or both)
  • && AND -- In A B && , check if A  is true and B  is true
  • ! NOT -- In A ! , check if A is not true
  • == In A B == , check if A  and B  are the same
  • != In A B != , check if A  and B  are not the same
  • > In A B >, check if A  is greater than B 
  • < In A B <, check if A is less than B  
  • >= in A B >= , check if A  is greater than or equal to B 
  • <= In A B <= , check if A  is less than or equal to B 
  • + In A B + , add A  and B 
  • -  In A B - , subtract B  from A 

Supported Expressions 

Examples of supported expressions are:

  • @quick match a label
  • @"quick win" match a label with multiple words
  • numLabels the number of labels a task/project has for comparing with a number (use @A @B && numLabels 2 == && to match exactly @A and @B and no others)
  • title:blog match word in title
  • title:"blog post" match multiple words in title
  • Title:xYz match word in title (case-sensitive)
  • Title:"X y Z" match multiple words in title (case-sensitive)
  • note:blog , note:"blog post" , Note:Blog , Note:"Blog Post"  as above, except for the note instead of the title
  • type:task match tasks
  • type:project match projects
  • pickedProject matches projects that have been selected for today using the Project Focus Picker strategy
  • hasChildren matches projects that have uncompleted task or subproject children, often combined with anyChild(...) or allChildren(...)  functions (see below) 
  • #Inbox match a category/project parent
  • #"Spring Cleaning" match a category/project with multiple words
  • !Morning match tasks assigned to a section
  • !"Bonus Tasks" match tasks assigned to a section with multiple words
  • *mip is a MIP (crowned project)
  • *"red star", *"orange star", *"yellow star"  match on priority
  • *isStarred matches any star
  • *"baby frog", *frog, *"monster frog" match on frog
  • *isFrogged matches any frog
  • isRecurring matches recurring tasks and projects
  • hasTime matches tasks with a time in the title e.g. "8:00 am Yoga"
  • time the exact time of a task can compare it to times in the format HH:MM
  • *backburner  matches backburner tasks/projects
  • *reward  matches reward tasks
  • *stale matches stale projects and tasks
  • *new  matches tasks and projects with the "new" tag
  • *review  matches tasks and projects with the "review" tag
  • <~5m match time estimate less than 5 minutes
  • <=~1h match time estimate less than or equal to one hour
  • >~30s match time estimate greater than 30 seconds
  • >=~20m match time estimate greater than or 20 minutes
  • 10 just a number, for comparing with other numbers (like numOpenTasks
  • numOpenTasks the number of open (not completed) tasks
  • numDoneTasks the number of completed tasks
  • numUnscheduledTasks the number of tasks that have not been scheduled (or automatically scheduled if the Auto-Schedule Due Tasks strategy is enabled)
  • numScheduledTasks the number of tasks that have been scheduled (or automatically scheduled if the Auto-Schedule Due Tasks strategy is enabled)
  • procrastinationCount the number of a days a task has been procrastinated
  • &planned match week- or month-planned tasks/projects
  • &unplanned match tasks/projects that don't have a planned week or month
  • &weekPlanned match tasks that have a planned week
  • &lastWeek match tasks/projects planned for last week
  • &thisWeek match tasks/projects planned for this week
  • &nextWeek match tasks/projects planned for next week
  • &monthPlanned match tasks that have a planned month
  • &lastMonth match tasks/projects planned for last month
  • &thisMonth match tasks/projects planned for this month
  • &nextMonth match tasks/projects planned for next month
  • isPinned match pinned tasks
  • fromPinned match tasks created from pinned tasks 
  • isScheduled  match tasks that are scheduled
  • isUnscheduled  match tasks that aren't scheduled
  • scheduleDate  the date the task is scheduled
  • selectedDate  the date of the day list you are currently looking at
  • dueDate  the date the task/project is due
  • endDate  the end date of a task/project (soft/artificial deadline)
  • startDate  the start date of a task/project
  • reviewDate   the next review date of a task/project
  • startOfWeek  and  endOfWeek  (based on work week start) for comparing with dates
  • startOfMonth  and  endOfMonth  (based on work week start) for comparing with dates
  • today  for comparing with scheduleDate /dueDate/endDate 
  • tomorrow  for comparing with scheduleDate/dueDate/endDate 
  • yesterday  for comparing with scheduleDate /dueDate/endDate  etc.
  • 5d ,1w ,-2m , 1y  for comparing with scheduleDate /dueDate (i.e. 5d  means 5 days from now and -2m  means two months ago)
  • isDependent for checking if the item depends on another item
  • hasDependants for checking if the item has items that depend on it

The parent and child functions

If you want to match tasks based on parent properties (for example all tasks that have a parent project that is either starred or due soon), then you can use the parent  function.  The parent  function accepts all the same operators and expressions above, and matches children of items matching the expression instead of the items themselves.

So whereas *isStarred type:project &&  would give you a list of all starred projects, parent(*isStarred type:project &&)  would give you a list of all tasks within starred projects.  The parent function can also be combined with other expressions to match properties of the parent as well as properties of the tasks themselves.  So, for example, parent(*isStarred) isUnscheduled && would match unscheduled tasks inside starred projects, and parent(&thisWeek) &thisWeek || procrastinationCount 0 > && would match procrastinated tasks inside projects planned this week.

If you want to search in the opposite direction, use one of the child filters.  anyChild(*isStarred) will show you the parent of any starred item, and allChildren(*isStarred) will show you parents when all of their children are starred.  Note: since 0 children is considered "all", you will often want to pair this with hasChildren (e.g. hasChildren allChildren(isScheduled) && will show you projects whose children are all scheduled and that have one or more children).

Null values

If you want to create a list with items that do not have a dueDate or startDate etc. use the advanced filter and use the NOT operator "!":
startDate !
dueDate ! 

Final Notes 

Please contact us if you want to match based on something not listed above and we'll try to add it right away.

And don't forget that your Advanced filter is combined with all of your other filters.  So if you've got an Item Type="Tasks" filter and an Advanced="@easy @quick ||", then the Smart List will match only tasks with labels easy or quick.

Did this answer your question?