Skip to main content
Advanced Smart List Filters

Full documentation for advanced smart lists

Mark avatar
Written by Mark
Updated over a week ago

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. One of our power users, Keith Edmunds, also contributed this in-depth guide.

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 . If one is a date and the other is a number, then the number is interpreted as a number of days. Similarly, adding a month and a number adds that number of months.

  • -  In A B - , subtract B  from A . If one is a date and the other is a number, then the number is interpreted as a number of days. Similarly, subtracting a number from a month subtracts that many months from it.

Supported Expressions 

Examples of supported expressions are:

  • @quick match a label

  • @Blog: match an entire label group

  • @"Quick win" match a label with multiple words

  • @"energy level:" match a label group with multiple words. Note: the : must come inside the quotes.

  • 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)

  • title0:work  match titles that start with "work" (can also use quotes, as above) 

  • Title0:Work  match titles that start with "Work" (case-sensitive, can also use quotes as above)

  • title/^work/i  match titles that match regex "^work" with modifier "i".   Can use any number of modifiers, and all regexes supported by your browser.  Be careful as complex regexes (especially those with back references) can cause performance issues if you have a lot of tasks/projects. Also note: due to the way Marvin parses advanced filters, you can't use a space (" ") in your regexps. Instead use \s (any whitespace) or \40 (" "'s octal escape sequence). Sorry about the inconvenience!

  • note:blog , note:"blog post" , Note:Blog , Note:"Blog Post"  as above, except for the note instead of the title

  • hasNote  includes any item that has a note

  • type:task match tasks

  • type:project match projects

  • type:category match categories

  • *isSequential matches sequential projects

  • *isParallel matches parallel projects. This is the default when you don't use the sequential projects strategy.

  • 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

  • isFirstStep matches the first open task in a project (using the old next step algorithm before Sequential Projects were introduced in 1.59.0). isNextStep is preferred. This exists for legacy smart lists. If you liked the old isNextStep behavior but choose to use the Sequential Projects strategy, then change your smart lists from isNextStep to isFirstStep. The new algorithm (in isNextStep when the Sequential Projects strategy is on) is improved in that it handles sequential and parallel Projects and in that it will do nested searches to find what the first step is.

  • isNextStep If the Sequential Projects strategy is on, then this this matches any children of parallel projects, or the first step of sequential projects. If the strategy is off then this behaves the same as isFirstStep (for backwards compatibility).

  • hasReminder  matches tasks with upcoming reminders 

  • 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

  • *rewardPoints is the number of reward points a task/project has. You can compare this with a number like *rewardPoints 3 > or *rewardPoints 1.5 <=.

  • *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

  • ~0 match items without a time estimate

  • Σ~0 match projects with no total time estimate of (no tasks with estimates inside)

  • <=~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

  • <Σ~20m match total time estimate less than 20 minutes (i.e. the computed sum among project tasks/subtasks) 

  • 10 just a number, for comparing with other numbers (like numOpenTasks ) or dates

  • 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 

procrastinationCount 5 >=
  • &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 true if this task/project is planned, else false. To match tasks that only have a planned month and aren't planned for a week, you can use the following filter:

    &planned &weekPlanned ! &&
  • &lastMonth match tasks/projects planned for last month

  • &thisMonth match tasks/projects planned for this month

  • &nextMonth match tasks/projects planned for next month

  • &2w match tasks/projects planned 2 weeks from now (use any number)

  • &6m match tasks/projects planned 6 months from now (use any number)

  • plannedWeek the date of Monday at the start of the week when a task is planned.  Can be used to compared with scheduleWeek or selectedWeek.

  • plannedMonth the month when a task is planned. Can be used to compare with selectedMonth.

  • 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

  • inheritedScheduleDate the date the task is scheduled, taking into account that it might inherit a schedule date from its parent project (in that it will show up in your day if its parent project is scheduled). The earliest of these dates is used. For example if a task is scheduled for tomorrow, but its parent project is scheduled today, then inheritedScheduleDate is today.

  • scheduleWeek  the date of Monday at the start of the week when a task is scheduled.  Can be used to compare with plannedWeek .

  • creationDate  the date the task was created

  • updateDate the date the task was last updated 

  • workedOnDate  the date the project or task was last worked on (time tracked or subtask completed)

  • doneDate the date when you marked a task or project complete (not necessarily the same as when it was scheduled when you marked it done - for that you can continue to use scheduleDate for completed items). Works only in Search as completed items are not displayed in Smart Lists.

  • selectedDate  the date of the My Day list you are currently looking at

  • selectedWeek the week of the My Day list you are currently looking at, useful for comparing with plannedWeek

  • selectedMonth the month of the My Day list you are currently looking at, useful for comparing with plannedMonth

  • 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

  • inCurrentTimeBlock checks if the item matches whatever the filter on the current time block is.  Note: if you've grouped your tasks by "time block section", then there may be items in your current time block's section that won't be matched by this filter. That's because they were manually added to this section, whereas inCurrentTimeBlock  refers to items that match the time block's filter.  Note: don't use inCurrentTimeBlock  in a smart list that's connected to a time block.  This would create an infinite loop and is therefore not used.

  • missingNextStep matches projects that don't have a next step defined

  • 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

  • isCalendarSynced for checking if an item is synced to a calendar via the calendar sync strategy

  • isOutlookSynced, isGoogleSynced, isIcloudSynced, isYahooSynced, and isCalDAVSynced filter based on whether items are synced with specific calendar providers

  • isSnoozed matches snoozed items.

  • isTracked (experimental) matches tasks that have been time tracked.

  • ##Fit match a Goal

  • ##"Be a non-smoker" match a Goal with multiple words

  • *inGoal matches Tasks/Projects that are in any Goal

  • *viaEmail matches Tasks that were created by email

  • *minutesTracked the number of minutes the task has been tracked so far, or 0 if not tracked yet. NaN for non-tasks.

  • *hasSubtasks matches Tasks that have Subtasks.

  • *hasOpenSubtasks matches Tasks that have open (uncompleted) Subtasks.

  • *numSubtasks the number of Subtasks a Task has. Always 0 for Projects.

  • *numOpenSubtasks the number of open (uncompleted) Subtasks a Task has. Always 0 for Projects.

The parent, child, and sibling 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 match tasks based on their grandparents (or above), it's a bit tougher. You can't nest parent functions (parent(parent(+today)) does NOT work). But there is an anyAncestor function which should cover most cases where this is useful. For example if you want to find all tasks and subprojects that have a parent, grandparent, etc. that is priority starred, use anyAncestor(*isStarred).

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).

Finally, if you want to match against sibling items, use on of the sibling filters. These will match against open items with the same parent. For example, if you wanted to match unscheduled tasks that don't have any scheduled sibling tasks, you could use isUnscheduled allSiblings(isUnscheduled) && .

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?