^getFor(path | item, attribute[, format] )^

Tinderbox Icon

Code Type:   Data Include
Code Scope of Action:   item

^getFor( path | item, attribute[,format])^

Gets any attribute you specify for any note you specify via the path. Note that:

^getFor (CurrentFileName, attribute)^ 

will get any attribute of the file like a root note. You can use just the note name, a partial path or a full path with outline layers being delimited with forward slashes: 'top/middle/bottom/note'

Multiple levels of inclusion are permitted, but cycles are detected and broken.

Color values - regardless of how defined inside the TBX (name, RGB or hex) are exported as hex; e.g #FF0000.If the attribute is of 'date' type then optionally a format string may be cited.

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^.


^getFor(Boolean Comparison,Name)^: Boolean Comparison

^getFor(Boolean Comparison,Color)^: #000000

^getFor(Boolean Comparison,Created,"*")^: Tue, 24 May 2005 23:46:03 +0000

^getFor(prevSibling,MyNumber)^: 42

... and possible substitutions using ^value^:

^value($Name(Boolean Comparison))^: Boolean Comparison

^value(format($Color(Boolean Comparison)))^: #00aa00

^value(format($Created(Boolean Comparison),"*"))^: Tue, 24 May 2005 23:46:03 +0000

^value($MyNumber(prevSibling))^: 42

^value($MyNumber(prevSibling) + 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: Export Codes - Full Listing
Previous: ^get( attribute[, format] )^  Next: ^host^ 

[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