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

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

^get ( attribute[, format] )^

DEPRECATED - use ^value()^ instead.

Gets the value of any attribute you specify. 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 normally seems to find the note, but you should probably avoid relying on this behaviour.

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:

^get(CodeType)^: Data Include

^get(Color2)^: #403a35

^get(Created)^: 9 Mar 2005 14:24

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

^get(MyNumber)^: 42

…and possible substitutions using ^value^:

^value($CodeType)^: Data Include

^value($Color2)^: dark warm gray dark

^value(format($Color2))^: #403a35

^value($Created)^: 09/03/2005, 14:24

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

^value($MyNumber)^: 42

^value($MyNumber + 8)^: 50

Note how some data types need to be wrapped in a format() call to get ensure usable web values (e.g with Color-type) and how the unformatted output of a Date Type varies between ^get^ and ^value^.

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 : ^get( attribute[, format] )^ (DEPRECATED)