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:
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:
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:
Supported Expressions
Examples of supported expressions are:
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) && .
Planned and archived items
&inFuture matches items planned for a future week or month. &inPast matches items planned for a week or month that is already over.
Archived items are left out of Smart Lists. To build a list of your archived tasks, projects and categories, use isArchived. It also matches items inside an archived category.
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.