The issue is that the assignment doesn't work like that. You can't assignto a field like that, regardless of whether it's math or text or anythingelse. The equals sign is just another letter when it's used in html.You'd probably need to play around with macros and the <$action-setfield>widget to get what you want to happen. AS you can see in your example. The<$calc> widget did add the two fields together resulting in the 8 you seein the example.

Matt Lauber

Hello dear helpers,in some tiddlers I have some (< 20) fields with numbers in them, ie{{!!field1}}=2, {{!!field2}}=4 and {{!!field3}}=5 and so on.I imported $:/plugins/mklauber/math.js<http://mklauber.github.io/tiddly-mathjs/#%24%3A%2Fplugins%2Fmklauber%2Fmath.js>from http://mklauber.github.io/tiddly-mathjs/Using <$calc>, I *cannot *add the sum of these three fields{{!!field4}}=<$calc>{{!!field1}} + {{!!field2}} + {{!!field3}}</$calc> intofield4.What went wrong?I need a solution for automatically calculating with the values of myfields (+, -, *, :, percent, average) and to store the result in an othernamed field. Is there such a solution out there? (Statistical valuescalculated about all tiddlers with these fields would be great.)The use case is to calculate the average points of students they got insome tests (and to get the average of all students).Greetings,Uwe

--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+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.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/adcb2e66-a2d4-4202-bfc9-1d8c626affe0%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

Here's a wiki with what you want, I think. You have to click the calculatebutton to put the value in the field.

Hello dear helpers,in some tiddlers I have some (< 20) fields with numbers in them, ie{{!!field1}}=2, {{!!field2}}=4 and {{!!field3}}=5 and so on.I imported $:/plugins/mklauber/math.js<http://mklauber.github.io/tiddly-mathjs/#%24%3A%2Fplugins%2Fmklauber%2Fmath.js>from http://mklauber.github.io/tiddly-mathjs/Using <$calc>, I *cannot *add the sum of these three fields{{!!field4}}=<$calc>{{!!field1}} + {{!!field2}} + {{!!field3}}</$calc> intofield4.What went wrong?I need a solution for automatically calculating with the values of myfields (+, -, *, :, percent, average) and to store the result in an othernamed field. Is there such a solution out there? (Statistical valuescalculated about all tiddlers with these fields would be great.)The use case is to calculate the average points of students they got insome tests (and to get the average of all students).Greetings,Uwe

--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+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.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/800dc9cc-d2fd-4cd7-808d-9e59f8b9d92f%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

And this is the (button based) solution only for adding the percentagebased points, not for the points themselves, not for the grades.

Automatically calculating values in the fields and in the tiddler like thisexample would be a great simplification:

{{!!schnitt}}=({{!!field1}}+{{!!field2}}+{{!!field3}}+{{!!field4}})/4

To comfortably calc with (more than two) fields is often needed. Perhapssome day a developer will see this problem and solve it. Let me know. ;-)

Greetings,

Uwe

Welcome to the club of non-functioning math in TW.Its a mess of half solutions.Josiah

in some tiddlers I have some (< 20) fields with numbers in them, ie{{!!field1}}=2, {{!!field2}}=4 and {{!!field3}}=5 and so on.I imported $:/plugins/mklauber/math.js<http://mklauber.github.io/tiddly-mathjs/#%24%3A%2Fplugins%2Fmklauber%2Fmath.js>from http://mklauber.github.io/tiddly-mathjs/Using <$calc>, I *cannot *add the sum of these three fields{{!!field4}}=<$calc>{{!!field1}} + {{!!field2}} + {{!!field3}}</$calc>into field4.What went wrong?

--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+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.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/0c194ce7-8bf5-43c1-80ab-59387f60d437%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

Post by UweAutomatically calculating values in the fields and in the tiddler like{{!!schnitt}}=({{!!field1}}+{{!!field2}}+{{!!field3}}+{{!!field4}})/4

While it's not direct (i.e not optimized), it should not be overlydifficult to make a macro with a listwidget and the argument "( field1 +field2 + field3 + field4 ) / 4" and iterates through this to pairwise (i.etwo numbers and one operator at a time) apply one of the existingcalculators (e.g Thomas Elmigers rpn plugin).

But then, there must be a *zillion* great js calculators that could just bewrapped up as a TW plugin (...he said confidently without having ever madea js plugin)

<:-)

--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+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.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/2d4e6f85-a9e3-4d9a-b08f-f30e122eaf26%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

Post by UweAutomatically calculating values in the fields and in the tiddler like{{!!schnitt}}=({{!!field1}}+{{!!field2}}+{{!!field3}}+{{!!field4}})/4

While it's not direct (i.e not optimized), it should not be overlydifficult to make a macro with a listwidget and the argument "( field1 +field2 + field3 + field4 ) / 4" and iterates through this to pairwise (i.etwo numbers and one operator at a time) apply one of the existingcalculators (e.g Thomas Elmigers rpn plugin).But then, there must be a *zillion* great js calculators that could justbe wrapped up as a TW plugin (...he said confidently without having evermade a js plugin)<:-)

--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+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.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/df4f3904-b933-46c1-9625-d95f8497e68e%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

Post by UweSo I have tried this with Thomas Elmigers rpn plugin,But how can I add the results of each of these expressions? (Has itsomething to do with the listwidget you mentioned?)

Yes, listwidget. I have not tried it so I may miss something fundamentalbut, basically, you'd iterate through the arguments recursively using therpn to calculate "up til now" along the way. I'm a bit unsure of how tohandle parentheses but spontaneously I'd think the first listwidgetfiltering must be to split out such sub-statements (i.e surrounded withparentheses) and then do the iteration with the rpn on it's contents. Ifyou could accept statements without parentheses, I think it would be moredirect and simpler. Regardless; if you have limited experience with filteroperators in TW... then I guess you have some fun ahead of you ;-) ...BUT,as noted, I don't think it would make for an effective solution given thatthere surely are optimized js calculators that can(?) be 'tiddlified'.

<:-)

--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+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.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/ca168494-66eb-4dde-8944-2ec5bd7d246d%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

Hint: in the shortcut <<syntax>> the tiddler from where to get the fieldvalue must be specified in the transclusion.

All the best,Thomas

Post by Uwehttps://tid.li/tw5/plugins.htmlhttps://tid.li/tw5/hacks.html#rpnTest<$macrocall $name="rpn" a={{!!field1}} b={{!!field2}} operation="+" 2/><$macrocall $name="rpn" a={{!!field3}} b={{!!field4}} operation="+" 2/>It is also not possible to add more than 2 fields in a macrocall.

Well, as demonstrated, it IS possible, but not very intuitive ;â)And: I would not recommend to try to add another level â the code gets toocomplicated. So 4 operands would be the limit.

--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+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.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/fbcfeddb-e0b4-4fac-8b8d-8a5c69826d98%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.

A different approach would be to use mathcell(http://mathcell.tiddlyspot.com/) that emulates spreadsheet-like abilities.

Good luck,Mark

Hello dear helpers,in some tiddlers I have some (< 20) fields with numbers in them, ie{{!!field1}}=2, {{!!field2}}=4 and {{!!field3}}=5 and so on.I imported $:/plugins/mklauber/math.js<http://mklauber.github.io/tiddly-mathjs/#%24%3A%2Fplugins%2Fmklauber%2Fmath.js>from http://mklauber.github.io/tiddly-mathjs/Using <$calc>, I *cannot *add the sum of these three fields{{!!field4}}=<$calc>{{!!field1}} + {{!!field2}} + {{!!field3}}</$calc> intofield4.What went wrong?I need a solution for automatically calculating with the values of myfields (+, -, *, :, percent, average) and to store the result in an othernamed field. Is there such a solution out there? (Statistical valuescalculated about all tiddlers with these fields would be great.)The use case is to calculate the average points of students they got insome tests (and to get the average of all students).Greetings,Uwe

--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+***@googlegroups.com.To post to this group, send email to ***@googlegroups.com.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/0b4eaccb-84b6-4dbd-b313-9eb27bd3c48e%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.