Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Questions and Answers >> ^action()^ inside $DisplayExpression
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1468558428

Message started by Scott Heftler on Jul 15th, 2016, 12:53am

Title: ^action()^ inside $DisplayExpression
Post by Scott Heftler on Jul 15th, 2016, 12:53am

Just discovered that I can put ^action()^ inside $DisplayExpression. Specifically, I use it to set the $Subtitle as well.  So both the title and the subtitle of the note in Map View are set at once.  Specifically, the DisplayExpression is this:

"Theme Folder" + ^action($Subtitle=$ThemeName)^

My question is: How taxing is this?  I wanted to find something like a $Rule but which only runs when an attribute is changed.  Is the condition-checking that goes on inside $DisplayExpression just as taxing as a $Rule?  Does adding this ^action()^ here bog things down?

Title: Re: ^action()^ inside $DisplayExpression
Post by Mark Bernstein on Jul 15th, 2016, 6:31am

DisplayExpression is evaluated every time a note's display name is needed; in general, it will be more costly than a rule. Occasional indulgence is probably fine, but in general I'd avoid this technique.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.