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 -- InA B ||, check ifAis true orBis true (or both)&&AND -- InA B &&, check ifAis true andBis true!NOT -- InA !, check if A is not true==InA B ==, check ifAandBare the same!=InA B !=, check ifAandBare not the same>InA B >, check ifAis greater thanB<InA B <, check ifAis less thanB>=inA B >=, check ifAis greater than or equal toB<=InA B <=, check ifAis less than or equal toB+InA B +, addAandB. 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.-InA B -, subtractBfromA. 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:
@quickmatch 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.numLabelsthe number of labels a task/project has for comparing with a number (use@A @B && numLabels 2 == &&to match exactly@Aand@Band no others)title:blogmatch word in titletitle:"blog post"match multiple words in titleTitle:xYzmatch word in title (case-sensitive)Title:"X y Z"match multiple words in title (case-sensitive)title0:workmatch titles that start with "work" (can also use quotes, as above)Title0:Workmatch titles that start with "Work" (case-sensitive, can also use quotes as above)title/^work/imatch 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 titlehasNoteincludes any item that has a notetype:taskmatch taskstype:projectmatch projectstype:categorymatch categories*isSequentialmatches sequential projects*isParallelmatches parallel projects. This is the default when you don't use the sequential projects strategy.
pickedProjectmatches projects that have been selected for today using the Project Focus Picker strategy
hasChildrenmatches projects that have uncompleted task or subproject children, often combined withanyChild(...) or allChildren(...)functions (see below)#Inboxmatch a category/project parent#"Spring Cleaning"match a category/project with multiple words!Morningmatch tasks assigned to a section!"Bonus Tasks"match tasks assigned to a section with multiple words*mipis a MIP (crowned project)*"red star",*"orange star",*"yellow star"match on priority*isStarredmatches any star*"baby frog",*frog,*"monster frog"match on frog*isFroggedmatches any frogisRecurringmatches recurring tasks and projectsisFirstStepmatches the first open task in a project (using the old next step algorithm before Sequential Projects were introduced in 1.59.0).isNextStepis preferred. This exists for legacy smart lists. If you liked the oldisNextStepbehavior but choose to use the Sequential Projects strategy, then change your smart lists fromisNextSteptoisFirstStep. The new algorithm (inisNextStepwhen 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.isNextStepIf 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 asisFirstStep(for backwards compatibility).hasRemindermatches tasks with upcoming remindershasTimematches tasks with a time in the title e.g. "8:00 am Yoga"timethe exact time of a task can compare it to times in the format HH:MM*backburnermatches backburner tasks/projects*rewardmatches reward tasks*rewardPointsis the number of reward points a task/project has. You can compare this with a number like*rewardPoints 3 >or*rewardPoints 1.5 <=.*stalematches stale projects and tasks*newmatches tasks and projects with the "new" tag*reviewmatches tasks and projects with the "review" tag<~5mmatch time estimate less than 5 minutes~0match items without a time estimateΣ~0match projects with no total time estimate of (no tasks with estimates inside)<=~1hmatch time estimate less than or equal to one hour>~30smatch time estimate greater than 30 seconds>=~20mmatch time estimate greater than or 20 minutes<Σ~20mmatch total time estimate less than 20 minutes (i.e. the computed sum among project tasks/subtasks)10just a number, for comparing with other numbers (likenumOpenTasks) or dates
numOpenTasksthe number of open (not completed) tasksnumDoneTasksthe number of completed tasksnumUnscheduledTasksthe number of tasks that have not been scheduled (or automatically scheduled if the Auto-Schedule Due Tasks strategy is enabled)numScheduledTasksthe number of tasks that have been scheduled (or automatically scheduled if the Auto-Schedule Due Tasks strategy is enabled)procrastinationCountthe number of a days a task has been procrastinated
procrastinationCount 5 >=
&plannedmatch week- or month-planned tasks/projects&unplannedmatch tasks/projects that don't have a planned week or month&weekPlannedmatch tasks that have a planned week&lastWeekmatch tasks/projects planned for last week&thisWeekmatch tasks/projects planned for this week&nextWeekmatch tasks/projects planned for next week&monthPlannedtrue 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 ! &&
&lastMonthmatch tasks/projects planned for last month&thisMonthmatch tasks/projects planned for this month&nextMonthmatch tasks/projects planned for next month&2wmatch tasks/projects planned 2 weeks from now (use any number)&6mmatch tasks/projects planned 6 months from now (use any number)&inPastmatch tasks/projects planned in the pastplannedWeekthe date of Monday at the start of the week when a task is planned. Can be used to compared withscheduleWeekorselectedWeek.plannedMonththe month when a task is planned. Can be used to compare withselectedMonth.+futurematch tasks/projects scheduled in the future+pastmatch tasks/projects scheduled in the past+lastMonthmatch tasks/projects scheduled last month+lastWeekmatch tasks/projects scheduled last week+nextMonthmatch tasks/projects scheduled next month+nextWeekmatch tasks/projects scheduled next week+thisMonthmatch tasks/projects scheduled this month+thisWeekmatch tasks/projects scheduled this week+todaymatch tasks/projects scheduled for today+tomorrowmatch tasks/projects scheduled for tomorrow+yesterdaymatch tasks/projects scheduled for yesterdayisPinnedmatch pinned tasksfromPinnedmatch tasks created from pinned tasksisScheduledmatch tasks that are scheduledisUnscheduledmatch tasks that aren't scheduledscheduleDatethe date the task is scheduledinheritedScheduleDatethe 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, theninheritedScheduleDateis today.scheduleWeekthe date of Monday at the start of the week when a task is scheduled. Can be used to compare withplannedWeek.creationDatethe date the task was createdupdateDatethe date the task was last updatedworkedOnDatethe date the project or task was last worked on (time tracked or subtask completed)doneDatethe 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 usescheduleDatefor completed items). Works only in Search as completed items are not displayed in Smart Lists.selectedDatethe date of the My Day list you are currently looking atselectedWeekthe week of the My Day list you are currently looking at, useful for comparing withplannedWeekselectedMonththe month of the My Day list you are currently looking at, useful for comparing withplannedMonthdueDatethe date the task/project is dueendDatethe end date of a task/project (soft/artificial deadline)startDatethe start date of a task/projectreviewDatethe next review date of a task/projectstartOfWeekandendOfWeek(based on work week start) for comparing with datesstartOfMonthandendOfMonth(based on work week start) for comparing with datesinCurrentTimeBlockchecks 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, whereasinCurrentTimeBlockrefers to items that match the time block's filter. Note: don't useinCurrentTimeBlockin a smart list that's connected to a time block. This would create an infinite loop and is therefore not used.missingNextStepmatches projects that don't have a next step definedtodayfor comparing withscheduleDate/dueDate/endDatetomorrowfor comparing withscheduleDate/dueDate/endDate
yesterdayfor comparing withscheduleDate/dueDate/endDateetc.5d,1w,-2m,1yfor comparing withscheduleDate/dueDate(i.e.5dmeans 5 days from now and-2mmeans two months ago)isDependentfor checking if the item depends on another itemhasDependantsfor checking if the item has items that depend on itisCalendarSyncedfor checking if an item is synced to a calendar via the calendar sync strategyisOutlookSynced,isGoogleSynced,isIcloudSynced,isYahooSynced, andisCalDAVSyncedfilter based on whether items are synced with specific calendar providersisSnoozedmatches snoozed items.isTracked(experimental) matches tasks that have been time tracked.##Fitmatch a Goal##"Be a non-smoker"match a Goal with multiple words*inGoalmatches Tasks/Projects that are in any Goal*viaEmailmatches Tasks that were created by email*minutesTrackedthe number of minutes the task has been tracked so far, or 0 if not tracked yet.NaNfor non-tasks.*hasSubtasksmatches Tasks that have Subtasks.*hasOpenSubtasksmatches Tasks that have open (uncompleted) Subtasks.*numSubtasksthe number of Subtasks a Task has. Always 0 for Projects.*numOpenSubtasksthe 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.
