Auto-initialization of fields

Wouldn't it be great if Tana could automatically fill out fields for you, so you wouldn't have to? In some cases, that's possible. Fields can have Initialize Functions which specify how their content should be autofilled when a new supertag is created (this is only triggered for fields that are part of a Supertag template, not for fields that you use otherwise).

This is different from default values of fields, because the fields can be filled out based on the context of their creation - when they were created, where in the graph they were created, who created them, etc.

To edit the Initialize Functions, go to a field's configuration panel (by clicking on its bullet from anywhere) and choose Advanced config. Scroll down until you find "Initialize expression". Click the fx symbol to toggle between editing the formula and seeing a preview (since the functions depend on the context of creation, the preview will often not make any sense).

Below are four different kinds of formulas that can be very useful.


If you want the date or date and time that the node was tagged, you can use CURRENT_DATE_REF or CURRENT_DATETIME_REF

If you want to format the time reference differently, or get the time reference from another field in the graph, you use the formatDate function. It takes two arguments (indented below), where the date comes from, and how to format it. If you want to reference the current date/time (similar to CURRENT_DATE_REF), use CREATED as the second argument. The third argument can be DATE_REFERENCE, DATETIME_REFERENCE, or any of the formatting strings that the Luxon library accepts

User - two ways

A simple CURRENT_USER will insert the user's email as text.

If you have nodes for users with a common tag, and a field for e-mail, you can use a similar setup to below to automatically look up and link to the right node. The expression below will look for any child of the list you reference, where the field you specify matches the email address of the current user.

Instance lookup

Let's say you often create bugs nested underneath a user, or you create tasks nested underneath a project. If these bugs have a user field, or tasks have a project tag, you can automatically fill these in. This will find any node with the tag referenced nested above in the hierarchy, and insert a reference to that node.

Available functions

There is a range of formulas that can be utilized if you want to try the more advanced side of Tana.

The formulas are written as names of functions/operations, where the children of that named node are the arguments to the function. The formulas are evaluated from leaf nodes and upwards so that an argument can itself be a function to be evaluated