The Advanced filter in a smart list lets you describe almost any list you can think of. It uses a way of writing called RPN (Reverse Polish Notation). The name sounds scary, but there is really only one rule to learn.
You find the Advanced filter at the very bottom of the Filters column when you create or edit a smart list. New to smart lists? Start with Smart Lists (Lists page).
The one rule: the joining word goes last
Normally you would write:
Quick OR EasyIn RPN you write the two things first, and the joining word last:
Quick Easy ORThat is the whole idea. Instead of words, Marvin uses short symbols:
||means OR (either one, or both). Example:@Quick @Easy ||means Quick or Easy.&&means AND (both). Example:@Quick #Work &&means Quick and in Work.!means NOT. Example:#Hobby !means not in Hobby.
|| and && join the two things in front of them. ! only needs one thing in front of it.
Naming things
A label:
@and the label name, for example@QuickA category or project:
#and its name, for example#WorkA goal:
##and the goal name, for example##FitnessA priority:
*and the star, for example*"red star",*"orange star"or*"yellow star"
Good to know:
Names with spaces need quotes:
@"Waiting for",#"Big Project".Capital letters don't matter:
@quickand@Quickare the same.A category includes everything inside it:
#Workalso matches tasks inside the projects that are in Work.Put a space between everything:
@Quick @Easy ||, not@Quick@Easy||.
Start simple: one thing
You don't always need a symbol. One thing on its own works fine.
Everything with the label Quick:
@QuickEverything in Work:
#WorkEverything with a red star:
*"red star"
Two things
Write both things, then the symbol.
Quick OR Easy:
@Quick @Easy ||Quick AND in Work:
@Quick #Work &&Labelled both Home AND Quick:
@Home @Quick &&Red star OR orange star:
*"red star" *"orange star" ||In Work AND red star:
#Work *"red star" &&
Leaving things out with NOT
Put ! right after the thing you want to leave out.
Everything NOT in Hobby:
#Hobby !Everything WITHOUT the label Waiting for:
@"Waiting for" !Quick, but NOT in Hobby:
@Quick #Hobby ! &&Neither Quick NOR Easy:
@Quick ! @Easy ! &&
Read the third one from left to right: "Quick", then "Hobby, NOT" (so: not in Hobby), then "AND" joins the two. Quick and not in Hobby.
Three or more things
Each || or && joins exactly two things. So with three things you need two symbols.
Quick OR Easy OR Short:
@Quick @Easy || @Short ||The same thing written another way:
@Quick @Easy @Short || ||Quick AND in Work AND red star:
@Quick #Work && *"red star" &&
Warning
A common mistake: @Quick @Easy @Short ||| does not work. There is no ||| symbol. Write || || (with a space) instead.
The easiest way to build a longer filter is one step at a time: add a thing, then its symbol, then the next thing, then its symbol.
Start with
@Quick @Easy ||(Quick or Easy).Add
@Short ||(or Short).Result:
@Quick @Easy || @Short ||
Mixing AND and OR
This is where RPN shines, because you never need brackets. Whatever should happen first, write first.
Example: Quick tasks in Home or Work
In normal writing: Quick AND (Home OR Work).
The part in brackets comes first:
#Home #Work ||Then add Quick and AND:
@Quick &&Result:
#Home #Work || @Quick &&
Example: Quick tasks that aren't hobbies, plus anything with a red star
In normal writing: (Quick AND NOT Hobby) OR red star.
First part:
@Quick #Hobby ! &&Then add red star and OR:
*"red star" ||Result:
@Quick #Hobby ! && *"red star" ||
Example: Red star tasks in Work, or anything overdue
First part:
#Work *"red star" &&Then:
deadlineOverdue ||Result:
#Work *"red star" && deadlineOverdue ||
How Marvin reads it (to check your work)
Not sure a filter says what you mean? Read it the way Marvin does:
Go from left to right.
When you reach a symbol, take the one or two things right before it and combine them into one.
Keep going until only one thing is left.
Let's read #Home #Work || @Quick &&:
#Home #Work ||becomes "Home or Work".Now we have "Home or Work"
@Quick &&.&&joins the two things before it: "Home or Work, and Quick". Done.
Durations
These need the Time Estimates feature. Use ~ and a number with m (minutes) or h (hours).
Shorter than 15 minutes:
<~15m1 hour or longer:
>=~1hExactly 30 minutes:
~30mBetween 10 and 20 minutes:
>=~10m <=~20m &&No time estimate:
noTimeEstimateQuick tasks in Work:
<~15m #Work &&
Tasks without a time estimate never count as "shorter than".
Dates
For dates you write the date, then what to compare it with, then the comparison. 7d means "7 days from today" and -7d means "7 days ago". You can also use w for weeks and m for months.
Due in the next 7 days (overdue included):
dueDate 7d <=Due today:
dueTodayOverdue:
deadlineOverdueHas a due date:
hasDeadlineNo due date:
dueDate !Created in the last 7 days:
creationDate -7d >=Scheduled for today:
+todayNot scheduled:
isUnscheduledPlanned for this week, or not planned at all:
&thisWeek &unplanned ||
The comparisons are < (before), <= (on or before), > (after), >= (on or after) and == (the same).
Other handy building blocks
Only tasks:
type:taskOnly projects:
type:projectTitle contains "call":
title:callTitle contains "call mom":
title:"call mom"Has any priority:
isStarredHas no priority:
noPriorityProjects with no next step:
missingNextStepTasks inside red star projects:
parent(*"red star")Has a note:
hasNoteDelayed 3 or more days:
procrastinationCount 3 >=
As you type in the Advanced box, Marvin suggests the building blocks it knows, so you don't have to remember them. There are many more than shown here. The full list is in Advanced Smart List Filters.
Ready-to-copy examples
Change the label and category names to your own.
Quick wins at home:
<~15m #Home &&Important and due soon:
*"red star" dueDate 7d <= &&Waiting for anything at work:
@"Waiting for" #Work &&Errands or calls:
@Errand @Call ||Work tasks, but no meetings:
#Work @Meeting ! &&Unscheduled work with a red star:
#Work *"red star" && isUnscheduled &&Quick or easy, but not hobbies:
@Quick @Easy || #Hobby ! &&Home or Garden, due this week:
#Home #Garden || dueDate 7d <= &&Old tasks that never got scheduled:
creationDate -30d < isUnscheduled &&
When it doesn't work
Marvin shows a message under the Advanced box when something is wrong. The most common ones:
"Too many arguments left... Maybe you forgot && or ||?" You have two or more things with nothing joining them, like
@Quick @Easy. Add||or&&at the end."...failed since there weren't enough arguments" A symbol doesn't have enough things in front of it, like
@Quick ||. Add the missing thing before the symbol."Unrecognized token" Marvin doesn't know a word. Use
&&instead of "and",||instead of "or" and!instead of "not", and check the spelling.
Also check:
The label or category name is spelled right. A label that doesn't exist simply matches nothing, without an error.
Names with spaces have quotes:
@"Waiting for".The preview on the right of the smart list dialog. It updates as you type, so you can see straight away if the list looks right.
Still stuck? Write to us and tell us in plain words what you want the list to show. We'll send you the filter.
Related articles
Advanced Smart List Filters (the full list of building blocks)