Actions

Tinderbox Icon

Actions are applied to notes or containers (including map adornments) and are the effect part of an agent. The parent (with the action) acts on its children. A special form of Action called a Rule can be used to act just on the note/agent itself.

Values are changed and information is gathered or changed as a result. Any resulting effects are applied only to the children. Rules are actions that only affect the note itself.

Agents may have actions.

In order to make Tinderbox export codes run in actions and rules it may necessary to start the code after the = sign with a caret and a space, e.g. "^ ". This mechanism is not explained in the manual. Note that the template expression begins with a caret (^) followed by a space. For example:

Name=^ made on ^get(Created,"Y-M-D")^

...sets the name of a note to a formatted date.

When an opening "" syntax is applied, the first space character is ignored (but subsequent spaces are treated as space characters. This avoids possibly ambiguities where Tinderbox might not know whether you intended the initial word to be a markup token. For example, in

Name=^ides of march

... Tinderbox would try to evaluate ^ides as a markup expression,

The space is optional and may be omitted in the (common) case where the template expression begins with a command:

Name=^get(Date)^ jottings

Multiple actions may be applied, if separated with semicolons, even if some of them are template expressions.

Note that semicolons may not appear inside a template expression action (since the parser would split the expression at the semicolon. Thus:

Name=;Color=red; ... OK

Name=Sing; Dance ... not what you expect

In the second example, the name of the note is set to Sing, and the stamp named 'Dance' is then applied to the note.

To set multiple Key Attributes in a multiple action, place the attributes string in quotes:

"KeyAttributes=Name;OutlineOrder";Name=^ made on 05-Feb-14

Actions and rules may use simple arithmetic and logical expressions. A broad range of functions can be run at action/rule scope often removing the need to use export codes. See Actions & Rules.


Up: Objects & Concepts
Previous: Links  Next: Agents 

[Last updated: 1 Dec 2008]

Google search aTbRef for:  

Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]

Creative Commons License

Made with Tinderbox