Surya,
Perhaps don't calc unless the required fields have a value
<$list filter="[all[current]has[gramvalue]]">
Do the calc here because gramvalue will be non zero.
</$list>
Note: has[fieldname] only returns if exist and non blank,
has:field[fielname] also returns if exists exist, blank and non blank.
Regards
tony
On Friday, 21 December 2018 07:06:07 UTC+11, Surya wrote:
>
> Hi,
>
> I made some calculation-tiddlers with the plugin $:/
> plugins/mklauber/math.js
>
> Everything is fine. The only thing I would like to avoid, is:
> When the field "myvalue" of the tiddler "calc Tiddler Data 1" from
> <$edit-text tiddler='calc Tiddler Data 1' field='gramvalue' size=5/>
> is empty, than the calculation shows as result:* Unable to parse 'round(
> * ,2)'*
>
> Is it possible (and how?) to avoid that "Unable to parse..."? Maybe, that
> it shows just nothing or only a / as a result?
>
> The whole is written like this:
> <$edit-text tiddler='calc Tiddler Data 1' field='gramvalue' size=5/>g
> <$edit-text tiddler='calc Tiddler Data 1'
> field='ingredient' size=20
> placeholder="Ingredient"/> <$edit-text
> tiddler='calc Tiddler Data 1' field='melttemperature' size=4/>°C
> >>Total-melttemperature of that ingredient in the
> recipe: ''<$calc>round({{calc Tiddler Data 1!!gramvalue}} * {{calc
> Tiddler Data 1!!melttemperature}},2)</$calc>°C''
>
> Would be so nice.... :-)
> Thanks, Surya!
>
--
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/4b5b564e-f173-4e4a-a604-bd8ac73b6727%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.