Oh silly me. That's fixed now, and it works as expected when the {{budgetDelta}} tiddler has j*ust a number* in it. As soon as I put in the formulas plugin syntax *(= {{Income Total}} - {{Expenses Total}} =)* it breaks. Maybe I need to find a way to do all the math using TW native functions instead. Because it seems that the variable is not stored as the numeric result of the formulas sum() function, but as the function call itself.
I uploaded a better test version of the site where you can play around with everything yourself, if someone has the time to take a look.. https://trumad.github.io/budgetlywiki/budgetDeltaRed.html - I have not added the CSS definitions yet, but you can see in the DOM that the class name remains black. (Unless you overwrite {{budgetDelta}} with a negative integer). Maybe there is a whole different way of achieving all this than I am currently aware of. Thanks so much for your help so far. On Tuesday, 11 May 2021 at 07:45:40 UTC+1 Eric Shulman wrote: > On Monday, May 10, 2021 at 11:31:07 PM UTC-7 tru...@gmail.com wrote: > >> Ok, this might get me somewhere. I did some testing like so, but the >> classname is always black: >> <$set name=number value=-5> >> <$set name=cssclassname >> filter="[<<number>>sign[]match[-1]then[red-bold]else[black]]"> >> <span class=<<cssclassname>>><<number>></span> >> </$set> >> </$set> >> > > Use *single angle brackets for variable references in filters.* > > Thus: > <$set name=cssclassname filter="[*<number>* > sign[]match[-1]then[red-bold]else[black]]"> > > -e > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/21aff407-8a11-430e-a9b9-fb50d46ef684n%40googlegroups.com.