Hi Alex,

How to write CalsFromCarbs variable to a tiddler field


This is not exactly the eval thread, plus your barrier is actually not even 
about eval. ;-)
Perhaps you thought setval would help with it,
but in this matter you need to do exactly what you'd do with *set* or *vars*
.

Before you read up on the solution, be careful with tiddler fields!
TiddlyWiki always turns them into lowercase,
so *kcalDay* and *Carbo-percent* will never be fields if you enter them in 
edit-mode!
However, I am not sure if and why TiddlyWiki would be forcing this 
behaviour.

*@Jeremy*, When and Why are we forcing field-names to be lowercase?

Now to the quite simple solution: use a ButtonWidget 
<http://tiddlywiki.com/#ButtonWidget> like so...

<$set name="CalsFromCarbs" 
filter="[[]eval[{{Carbo-needs!!kcal-per-day}}*{{Carbo-needs!!carbo-percent}}/100]]">
<$button set="!!kcal-carbs" setTo=<<CalsFromCarbs>>>
set ''kcal-carbs'' to <<CalsFromCarbs>>
</$button>
</$set>

; kcal-carbs
: {{!!kcal-carbs}}

Best wishes,

Tobias.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/32989058-6c55-45d7-a9b9-a848cdea539b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to