On Monday, February 17, 2020 at 10:51:15 PM UTC-8, Gerald Weis wrote:
>
> <td>[[$kmneu$]subtract[$kmalt$]]</td>
> <td>[[[$getankt$]multiply[100]]divide[[$kmneu$ $kmalt$ substract[]]]]</td>
> <td>[[$Gesamtpreis$]divide[$getankt$]]</td>
>
You are using the wrong kind of outer brackets.
To *evaluate* a filter, use tripled curly braces around the entire filter
expression. Also, you can't "nest" filters, so use a variable to hold the
result of the first calculation, and then reference that variable in the
second calculation.
Finally, *after* computing the desired values, reference the variables to
produce the output.
Thus:
\define Benzkauf2(Datum kmalt kmneu getankt Gesamtpreis)
<$vars v1={{{ [[$kmneu$]subtract[$kmalt$]] }}}>
<$vars v2={{{ [[$getankt$]multiply[100]divide<v1>] }}}>
<$vars v3={{{ [[$Gesamtpreis$]divide[$getankt$]] }}}>
<tr align=right>
<td>$Datum$</td>
<td>$kmalt$</td>
<td>$kmneu$</td>
<td>$getankt$</td>
<td>$Gesamtpreis$</td>
<td><<v1>></td>
<td><<v2>></td>
<td><<v3>></td>
</tr>
</$vars>
</$vars>
</$vars>
</tr>
\end
That should do what you want. Let me know how it goes.
enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki - http://www.TiddlyTools.com/InsideTW/
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/e64bccf8-9730-480c-b986-a45b415a9668%40googlegroups.com.