field math: field = field + 1

123 vistas
Ir al primer mensaje no leído

Dave

no leída,
5 jul 2018, 2:19:03 p.m.5/7/18
para 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

no leída,
5 jul 2018, 2:24:39 p.m.5/7/18
para TiddlyWiki

@TiddlyTweeter

no leída,
5 jul 2018, 2:32:47 p.m.5/7/18
para TiddlyWiki
Or, for basic Math, Telmiger's simple, flexible, RPN plugin, https://tid.li/tw5/plugins.html#%24%3A%2Fplugins%2Ftelmiger%2Frpn

Dave

no leída,
5 jul 2018, 3:01:24 p.m.5/7/18
para TiddlyWiki
That's perfect! 

Thank you :)

TonyM

no leída,
5 jul 2018, 10:17:18 p.m.5/7/18
para 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

no leída,
5 jul 2018, 10:27:05 p.m.5/7/18
para TiddlyWiki
Tony!
 The modified one is in Tobias Beer tb5 and it works. The TW version there is 5.1.13


/Mohammad

Dave

no leída,
7 nov 2018, 12:58:14 p.m.7/11/18
para 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

no leída,
8 nov 2018, 12:02:07 a.m.8/11/18
para 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

no leída,
8 nov 2018, 12:24:13 a.m.8/11/18
para 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

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos