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

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

This pages describes features, codes or syntax whose use is now DEPRECATED, i.e. not advised either for new or continued pre-existing use.

Deprecated aspects of Tinderbox may be supported on a legacy basis but the latter support can't be presumed to be indefinite. Therefore you should update your active TBX documents to latest practice as soon as practical.


Code Type: 

Code Scope of Action: 

Code First Added: 

Code Altered: 

 Data Include   [other codes of this type]

 item   [codes with similar scope]

 Already in v5.0.0

 format"


DEPRECATED - use ^value()^. See ^value^.

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

DEPRECATED - use ^value()^ instead.

Gets the value of 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 as an alternative

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

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

^getFor(Boolean Comparison,Color)^: #00aa00

^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:00 +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.


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


A Tinderbox Reference File : Deprecated Usage : Deprecated Export Codes : ^getFor(path | item, attribute[, format] )^ (DEPRECATED)