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

Basic action code syntax

Case sensitivity: Action code operators are always case-sensitive (unlike export codes).

Expressions: a term for action code involving some evaluation, and by extension any piece of action code. Thus even the simplest code, such as the assignment of a literal value, may still be regarded as an expression:

$Text="A Life on the Ocean Wave." 

More often, actions and rules may use simple arithmetic and logical expressions.

$Width=5+2; 

$Width=$Height(parent)*1.5; 

$Urgent= (Overdue | Essential); 

$Width =($Width(/Configuration)+1)*$Scale; 

Because Tinderbox recognises operators such as + and -, notes whose names begin with characters other than letters and numbers may sometimes be interpreted in unexpected ways. For example, if a note is named "6*7", rules like

$Prototype=6*7 

…might be parsed as a multiplication with the result of 42.

$Prototype="6*7" 

…should have the expected effect. Quoting characters will always cause Tinderbox to treat such content as literal text.

Actions and rules may use computation with data attributes - including attribute values from other notes. For example:

$DueDate = $DueDate(parent) + "7 days"; 

$DueDate = $ExpiryDate(parent) - "10 days"; 

Date attribute values can also be computed with literal dates and date designators:

$DueDate = "November 15, 2004" + "7 weeks" 

In the previous examples note that the actual and partial date strings use quotes.

Review old code: Longtime users of Tinderbox should revisit code to ensure all string literals are quoted as current support for non-quoted string usage is for legacy purposes and will be withdrawn. Likewise, new users trying old code samples should be aware that the code may use legacy syntax.


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


A Tinderbox Reference File : Actions & Rules : Basic action code syntax