^get( attribute[, format] )^

Tinderbox Icon


Code Type:   Data Include
Code Scope of Action:   item

^get ( attribute[, format] )^

Gets the value of any attribute you specify (represented here by attribute_name).

There are syntax considerations for color and date type attributes:

get vs. getFor

How do ^get(attribute)^ and ^getFor(object, attribute)^ differ? ^get(attribute)^ is the same as ^getFor(this,attribute)^. Object names are case sensitive, i.e. this not This.

What if a note's name matches a keyword like current or parent, will Tinderbox pick the note or the relationship? It's undefined. Tinderbox 2.4 will find the note, but you should probably avoid relying on this behaviour.

Consider using action code

^value^ can be used to call attribute values, with the additional benefit of being able to apply action code modifications. By using a path modifier to the action code's attribute reference, getFor can also be substituted for using ^value^.

Examples:

^get(CodeType)^: Data Include

^get(Color2)^: #000000

^get(Created,"*")^: Wed, 9 Mar 2005 14:24:21 +0000

^get(MyNumber)^: 42

... and possible substitutions using ^value^:

^value($CodeType)^: Data Include

^value(format($Color2))^: #c0b4a8

^value(format($Created,"*"))^: Wed, 9 Mar 2005 14:24:21 +0000

^value($MyNumber)^: 42

^value($MyNumber + 8)^: 50

The latter examples show how ^value^ makes it easy to add in transforms on the fly that aren't in the export codes and/or cut down on the amount of export code syntax to be remembered.


Up: Item-based
Previous: ^file( item )^  Next: ^getFor(path | item, attribute[, format] )^ 

[Last updated: 14 Dec 2009, using v5.0]

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