This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox Icon

^action( action )^


Code Type: 

Code Scope of Action: 

Code First Added: 

Code Altered: 

 Calculation   [other codes of this type]

 n/a   [codes with similar scope]

 Already in v5.0.0

 format"


^action( action )^

This code performs any action, or list of actions, that could be performed by an agent or rule. For simplicity, consider it as if it were a rule that is only run when a note is exported using the template holding the ^action()^ code.

The action code is performed immediately. ^action^ does not export anything itself. For example:

^action($Color="red")^ ^value($Color.format())^ 

will change the colour of the exported note to "red" and export "red".

This allows manipulations for export use without needing to, for instance, hold the value in a user attribute first.

Also see, action(), ^value( expression )^.

The internal equivalent is a normal action/rule statement, i.e. there is no point in using ^action^ internally. However, if you want some logic during export to change an internal attribute value (e.g. exported notes having a new colour), then use ^action^ in the context of your export codes.


Possible relevant notes (via "Similar Notes" feature):


A Tinderbox Reference File : Export Codes : Export Code Scope : Scope n/a : ^action( action )^