Tinderbox Icon

Operator Type:   Data manipulation
Operator Scope of Action:   Item

The eval() operator takes two quoted evaluated (as string) parameters, i.e. the parameters. The first parameter is optional. Thus, in basic form:


will set AttribY to the name of the current name's note or it's grandparent depending on the value of attribute MyBool by evaluating attribute AttribX.

The eval() operator also allows access to two properties that aren't available via action syntax, the current TBX document's filename (sans extension) and app version:

eval(^docTitle^) - gives a value of "aTbRef47 copy" (note no '.tbx' extension)

eval(^version^) - gives "5.0" (note - you might want to prefix the return string with 'v' or 'v.' thus: "v.5.0").

In full syntax form, an additional first parameter is added that is an expression string evaluating as a note name, path or note name. Where specified, this indicates the note from which attribute values in the second parameter should be drawn.

Up: Data manipulation operators
Previous: do(macro[,args])  Next: firstWord(data) 

[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