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.

There are three kinds of initialization functions which are easily available when configuring a field

Date field
Automatically initialize with the current date
User field
Automatically initialize with the currently logged in user
Instance field
Automatically initialize with an ancestor node with the given tag

This video explains how to use these three functions

There are many more options in the advanced config. To edit advanced 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).

User node (not inline user reference)

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.

Look up field from instance of a tag above

This will fill in the field author, taken from the node above with the tag Source. The use case: I might capture some quotes from the source, and I'd like them all to be attributed to the correct author.

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