#5 Live Search Series: Parent / Grandparent
Welcome back to the next installment of the previously titled “Live Search Series.” Now it’s called “Query Builder Series” because Tana updated the name. Rest assured, it’s the same series. Here is an INDEX to the entire QUERY BUILDER (FKA Live Search) SERIES
This edition covers the use of PLAIN TEXT KEYWORDS PARENT and GRANDPARENT and DESCENDENTS, WITH REFS, and the newly released (as of 11/3/2023) DOT NOTATIONS — what they are, how to use them - with examples.
Thank you for your continued support. I'm on a mission to help the less tech-savvy community enjoy Tana's power. Your questions are always welcome, so please post any question in SLACK (here’s a Slack invite), in our exclusive Substack subscribers-only Chat (including free subscribers), or DM me in SLACK or Twitter.
TABLE OF CONTENTS for #6 Query Builder Series: Parent / Grandparents
Things to remember about KEYWORDS
Understanding Parent / Grandparent Relationships in Query Builder and why use them
Using Parent / Grand Parent DESCENDANTS (with and without REFS) Variations
Using Parent / Grandparent DOT NOTATION Variations
Using DOT NOTATION with DATES
Items to remember
(this section is a repeat from Edition 4 in the Query Builder Working with DATES)
All KEYWORDS are entered as PLAIN TEXT fields, meaning that they are NOT prefaced with any symbol - just entered as normal text on a plain dot node.
KEYWORDS are very specific. Don’t change any word, no matter how grammatically correct it might seem.
For example, DO NOT change — ✅ Done LAST 1 DAYS — to —
🚫 Done in LAST 1 DAYS — or
🚫 Done LAST 1 DAY
Capitalization and underscores, as shown in the Tana documentation, are optional
If no underscore is shown in the documentation - do not add
Many of these KEYWORDS are most effective when combined with other KEYWORDS, date ranges, SuperTags, or FIELDS
Now, let’s dig into each KEYWORD related to PARENT and GRANDPARENT.
Understanding Relationships in Query Builder
PARENT and GRANDPARENT are PLAIN TEXT KEYWORDS used in the QUERY BUILDER (other KEYWORDS were discussed in #4 Query Builder Series: Dates and Todo Keywords) and are used to find nodes that refer to another node relative to the SEARCH NODE’s location.
Clear as mud, right?
Perhaps an image explaining how the PARENT KEYWORD might help:
In this example, We have a node that represents a Book Title. Tucked underneath the title is basic information about the book (which are the fields of the Supertag #book). This #book tag also includes a SEARCH NODE title, “This book’s slipbox notes.”
In this USE CASE, Highlights from the book (imported from READWISE) are listed at the bottom of this node. When reviewing the highlights, I might want to create a “#slipbox” note for my Zettelkasten. I do this right underneath the highlight to which it pertains. Thus, the #slipbox notes are scattered throughout the highlights.
The purpose of the SEARCH NODE is to gather in one place all the slipbox notes about this book.
The QUERY itself asks for any node that:
is tagged “#slipbox” AND
PARENT, in this case, refers back to the PARENT of the SEARCH Node, and since the SEARCH node is a “child” to the “Book Name” node -its PARENT is the book’s title “Book Name”
If you didn’t use PARENT, you’d have to type the Book’s TITLE in your search - which would work — BUT — you’d have to change it for each and every book in your graph.
Thus, using PARENT automates that for you. It will always look for the book title of that instance. Once you create the search, it will work in all instances.
INSTANCE: each new node (aka book title) created with the supertag #book is an “instance”
Here is a visual using GRANDPARENT:
It works the same way as the PARENT KEYWORD, but since the actual SEARCH NODE is indented under the Supertag field titled: “Slipbox Notes” (aka Search Node is a “child” of the field “Slipbox" Notes” - you now need to use GRANDPARENT for Tana to look two levels up to the “Book Name” node.
🚫 If you used PARENT in the above example, it would look for any node that:
is tagged “#slipbox” AND
Links_TO the SEARCH NODES PARENT, which is the field “SLIP BOX NOTES”
To summarize, PARENT and GRANDPARENT are relative to where the SEARCH NODE is located:
PARENT looks up ONE level from the SEARCH NODE location
GRANDPARENT looks up TWO levels from the SEARCH NODE location
There are several variations of PARENT and GRANDPARENT, including:
Descendents with Refs
Each variation is described below.
How to use Parent / Grand Parent with examples
➡️ DEF: A keyword that finds the node one level up from the SEARCH NODE’s location
🤷♀️ USE WHEN: You want a value in a search to be dynamic (aka specific to a value in the node one level above the search node).
The search below looks for nodes that
Are tagged #task AND
Have a PROJECT field value of PARENT
PARENT, in this case, “is replaced” by the node name
The Node name is the PARENT of the SEARCH node.
Notice also the “linter” (item in green oval); it interprets what your search is doing. In this case, it confirms that PARENT will be substituted with the node name “Marketing Plan for ABC company”
🚫 Beginner Gotchas -
PARENT reference is the PARENT of the SEARCH node.
🚫 The search below does NOT work because the search node is indented, and the field value “Indented Search Node” becomes the Search Node’s PARENT — which is not what we wanted.
➡️ DEF: A keyword that finds the node two levels up from the SEARCH NODE’s location
🤷♀️ USE WHEN: your search node is indented. The search above that didn’t work when PARENT was used DOES work when you change it to GRANDPARENT, as shown below:
🚫 Beginner Gotchas - same as with PARENT
➡️ DEF: A keyword that finds nodes that are descendants of the parent of the search node, excluding references.
🤷♀️ USE WHEN: nodes you want are at various levels of the node - some indented one level, some two levels, some are children, some are siblings (at the same level)
In the DAY node illustrated below, there are various items tagged todo. Some are direct children, siblings, grandchildren, and even great-grandchildren.
This demonstrates why Tana advocates say, “It doesn’t matter where you put it” because a properly worded Query can retrieve it.
The search below looks for nodes that are tagged #todo anywhere within the Search nodes PARENT (which in this example is the day node: Fri, Nov 10).
🚫 Beginner Gotchas -
Another reminder - it’s all relative to the location of the SEARCH NODE. In this example, the search node is a direct child of the DAY NODE — thus, PARENT works.
PARENTS_DESCENDANTS - only returns ORIGINAL nodes, not nodes that are references.
If you look closely, one of the ”DIRECT CHILDREN" nodes tagged todo is titled “Get Article finished.” It is a reference, not an original node, and thus does NOT appear in the results.
In our search, we wanted only todo “CREATED TODAY”; thus, using the PARENT_DESCENDANT (which does not include REFS) is the correct option.
➡️ DEF: A keyword that finds nodes that are descendants of the parent of the search node, including references.
🤷♀️ USE WHEN: you want to include references in your DESCENDANTS. This makes it possible to define searches on nodes in Supertags and have the supertag instances get local search behavior.
For example, a Project supertag could have a Bugs node with a search defined that would only find Bug-instances within the scope of the project from which it was run.
The search below is from the node identical to the above example. Only this time, we select PARENTS_DESCENDANTS_WITH_REFS. Now, the results include the reference to “Get Article Finished”
🚫 Beginner Gotchas - no additional Gotchas
➡️ DEF: A keyword that finds nodes that are descendants of the grandparent of the search node, excluding references.
🤷♀️ USE WHEN: the search node is indented, and you want to select nodes from anywhere in the GRANDPARENT node of the search node
🚫 Beginner Gotchas - no additional gotchas
➡️ DEF: Same as GRANDPARENTS_DESCENDANTS, but results include references
🤷♀️ USE WHEN: you want to include references
🚫 Beginner Gotchas - no additional Gotchas
Tana Deconstructed by Dee Todd is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.
Using Parent / Grandparent DOT NOTATION
DOT NOTATION for Parent and Grandparent was released on November 3, 2023, and added a lot of flexibility to an already powerful Tana Query feature.
➡️ DEF: A keyword combination that points to the value of a field in the parent node, one level up
🤷♀️ USE WHEN:
A meeting tag and you want to find other meetings of a related project (where “project” is a field in your meeting tag)
A Project tag, and you want to find other tasks with the same category as the parent node’s category. Take a look at this:
🚫 Beginner Gotchas -
You MUST use the same field in both tags. In the example above, the CATEGORY field in both tags (#tasks, #project) must be the same field.
➡️ DEF: A keyword combination that points to the value of a field in the parent node two levels up
🤷♀️ USE WHEN: the search node is indented one level
🚫 Beginner Gotchas -Same as above
Using DOT NOTATION with DATES
You can also use DOT NOTATION with DATES.
But wait! That’s not all. You can now do simple addition and subtration with the dates! 🎉
➡️ DEF: Addition to KEYWORDS PARENT and GRANDPARENT that enable simple math with DATES (only)
🤷♀️ USE WHEN: you want to add or subtract up to three weeks to the DATE in PARENT or GRANDPARENT Node
🚫 Beginner Gotchas
Can only be used on a DAY/ WEEK/YEAR nodes
🤷♀️ DID YOU KNOW - DOT Notation isn’t new?
Just an aside, but since we are talking about DOT NOTATION
Did you know you can use DOT NOTATION When Building a Field Title?
When a field is indented, you can use that value in your BUILD TITLE syntax by appending the original find name with DOT FIELD name, as shown below:
We have thoroughly DECONSTRUCTED PARENT / GRANDPARENT KEYWORDS, including the NEW Dot Notation support. Below are announcements and resources posted since the last edition.
Since the last edition, Tana has been very busy!
The following announcements have been made since the edition. Here’s what’s in it for you:
NEW SIDE MENU VIEW - a new VIEW OPTION to show your node as a side view, like tabs only but sideways (vertical menu on the left)!
TANA PUBLISH - Publish any node in your graph to the web. Anyone with the link can view it. It’s not indexed in search engines. It's a lovely way to present information to your team, co-workers, family, and friends - and they don’t have to have TANA access. To invoke: CMD/CTRL k > Publish
Brings up a Publish Preview Page of the node:
Here are some great examples:
Andrea’s invoice generator: https://x.com/TanaNodes/status/1716830276398248077?s=20
Jac Gautreau’s Books I’ve read: https://x.com/gautjac/status/1716949597371982187?s=20
Siobhan Solberg’s Music Flow page: https://tana.pub/iUFJlUFI3jaC/flow
Arbor Cogitandi Digital Ramblings: https://tana.pub/Qz3BjZ1Uht/arbor-cogitandi-digital-ramblings
TANA for DESKTOP - dedicated desktop app for Mac, Windows, or Linux. It is faster, leaner, and distraction-free.
It also packs a superpower: From any app, use ctrl or cmd + shift + E to start Tana Voice Capture! (Same to stop capture!) You can find your recordings in your Tana Inbox, ready to be transcribed and processed using Tana AI.
To provide feedback on TANA DESKTOP
PARENT / GRANDPARENT DOT Notation - covered in this edition of the QUERY BUILDER Series
NEW TANA TOOLBAR - especially for mouse users.
You can now create, tag, and edit objects in the middle of your text, easy peasy! With aliases and HIGHLIGHTING, Referencing, and TAGING, and more.
SEARCH NODE REVAMP - Tana renamed the search node from LIVE SEARCH to QUERY BUILDER. Vol 10, Edition 4 Deconstured was updated to include these new features. They updated the drop downs in the QUERY BUILDER to include all your options for search operators and system fields, and added a field values drop down. It's nice to have everything in one place! More:
Updated UI words and names
Tana team replaced wording like:
Live Search = Search/Query (depends on context)
Search expression = Query builder
Modified = Edited
All search operators are now available via dropdown
Tana team added all common operators to the Search Operator dropdown and sorted them according to type. They also added a separate Field value dropdown. Both have updated tooltips!
Some required underscores, while others didn't. How confusing! Everything works without them now. Note: Keywords that used to have underscores will still work!
Linter "language" has been streamlined and simplified
The linter is still the best place to understand what your query is doing, and with the latest updates, this has become less confusing!
Operators we've added over the past weeks include:
FOR RELATIVE DATE [yesterday|last month]
ON DAY NODE
IS CALENDAR NODE
IS SEARCH NODE
New Documentation: Search nodes - BOOKMARK this page!!
All of this and more has been documented here at our WIP Tana Docs: https://tana.inc/docs/search-nodes
This brings us to the end of this issue. Additional resources related to topics in this issue are listed below.
NEW TANA Resources
(since the last edition):
I'm not an expert at Tana, nor do I work for them.
As a passionate volunteer and avid user,
I research these deconstructions to help me learn,
but I write them to help you learn from my mistakes.
I've done my utmost to ensure the accuracy of this information,
including extensive testing and review
by other Tana users more experienced than I am.
That said, I'm human.
I sometimes get it wrong
(please don't tell my husband I admitted that ☺️).
If you find an error or have questions- please comment below,
use my exclusive Substack subscribers-only Chat (including free subscribers),
or DM me in SLACK or Twitter
If you don’t have access yet to Tana, you can sign up for Early Access on the Tana.inc site, then pop over to the Slack “Introduce Yourself” channel, and well, eh, introduce yourself. The Tana Team will DM you an invite.
Tana development has so far catered to the tech-savvy, early adopters, but I’m here to change that. Please do not be intimidated by Slack posts. I fear many newcomers are not asking beginner questions because the technical wizards are geeking out about the newest features, and maybe some of you find that intimidating! (I know I did!)
Let me say this - I have your back 🤝.
P.S. I value your trust. I will NEVER share your email address.