field math: field = field + 1

141 views
Skip to first unread message

Dave

unread,
Jul 5, 2018, 2:19:03 PM7/5/18
to TiddlyWiki
What's the simplest way to do this? 

 I did read about possibly having to install a "spreadsheet" plugin, but surely there is a simple straight foreward way to do addition and subtraction of values in fields...


Thanks,
Dave

Mohammad

unread,
Jul 5, 2018, 2:24:39 PM7/5/18
to TiddlyWiki

@TiddlyTweeter

unread,
Jul 5, 2018, 2:32:47 PM7/5/18
to TiddlyWiki
Or, for basic Math, Telmiger's simple, flexible, RPN plugin, https://tid.li/tw5/plugins.html#%24%3A%2Fplugins%2Ftelmiger%2Frpn

Dave

unread,
Jul 5, 2018, 3:01:24 PM7/5/18
to TiddlyWiki
That's perfect! 

Thank you :)

TonyM

unread,
Jul 5, 2018, 10:17:18 PM7/5/18
to TiddlyWiki
Mohammad,

Have you actually used the one at http://mathmacros.tiddlyspot.com/ the wiki is version 5.1.5  and  Is not working out of the box in 5.1.17

Regards
Tony

Mohammad

unread,
Jul 5, 2018, 10:27:05 PM7/5/18
to TiddlyWiki
Tony!
 The modified one is in Tobias Beer tb5 and it works. The TW version there is 5.1.13


/Mohammad

Dave

unread,
Nov 7, 2018, 12:58:14 PM11/7/18
to TiddlyWiki
Okay, I'm trying to subtract one field from another

field "due" is 20181112

and field "mynow" is 20181106

this works:
<<calc !!due -1>>
to give 20181111

but I've tried this
<<calc !!due -!!mynow>>
and this
<<calc !!due - !!mynow>>
and this
<<calc !!due -<$view field="mynow"/> >>

and I either get "20181112" as the result, or NaN

Is the calc macro only able to calculate with a single field?


TonyM

unread,
Nov 8, 2018, 12:02:07 AM11/8/18
to TiddlyWiki
Dave,

I think you must use a text reference {{!!fieldname}} or fieldname

But never a !!fieldname

Check the calc doc and look for an example.

Tony

Dave

unread,
Nov 8, 2018, 12:24:13 AM11/8/18
to TiddlyWiki
Found it!

this works
<<calc !!due -  by:!!mynow>>

I had skipped that previously because I though "by" indicated something else, but it actually is:

a value or a TextReference serving as the operand if the operation does not define any

Reply all
Reply to author
Forward
0 new messages