TiddlyWiki Math Fields with tags

73 views
Skip to first unread message

Reaktorblue

unread,
Apr 8, 2020, 4:35:09 PM4/8/20
to TiddlyWiki
Hello,

Is there a way to add up numbers that are in the tiddler fields? For example, if I wanted to add up all of the numbers in field "cost" for all tiddlers tagged "incomplete" and "component" would that be possible? I was thinking maybe the mathematics operators but I haven't been having much luck getting that to work

Mohammad

unread,
Apr 8, 2020, 5:10:58 PM4/8/20
to TiddlyWiki
I am sure you get some detailed answers but for short and quick: Shiraz dynamic table is a one answer!

--Mohammad

Eric Shulman

unread,
Apr 8, 2020, 5:38:53 PM4/8/20
to TiddlyWiki
On Wednesday, April 8, 2020 at 1:35:09 PM UTC-7, Reaktorblue wrote:
Is there a way to add up numbers that are in the tiddler fields? For example, if I wanted to add up all of the numbers in field "cost" for all tiddlers tagged "incomplete" and "component" would that be possible? I was thinking maybe the mathematics operators but I haven't been having much luck getting that to work

This will do exactly what you want:
{{{ [tag[component]tag[incomplete]get[cost]sum[]] }}}

enjoy,
-e

 

Reaktorblue

unread,
Apr 9, 2020, 1:35:00 AM4/9/20
to TiddlyWiki
Thanks!

This is exactly what I was looking to do. Thank you so much for all of the help!!

Reaktorblue

unread,
Apr 9, 2020, 1:42:22 AM4/9/20
to TiddlyWiki
Eric,

Just curious but is there a way to format this as text? It seems to make the sum a link to a tiddler but I'd rather just have it display the value as text so I can format it with a "$" in front of it if possible

On Wednesday, April 8, 2020 at 5:38:53 PM UTC-4, Eric Shulman wrote:

TonyM

unread,
Apr 9, 2020, 3:03:21 AM4/9/20
to tiddl...@googlegroups.com
Just wrap the whole thing as follows

'<$text text={{{ above filter }}}/>`

tony


Edited thanks to Eric

Eric Shulman

unread,
Apr 9, 2020, 4:19:39 AM4/9/20
to TiddlyWiki
On Thursday, April 9, 2020 at 12:03:21 AM UTC-7, TonyM wrote:
Just wrap the whole thing as follows

'<text text={{{ above filter }}}/>`


Minor typo in Tony's reply.  As with all widgets, the widget name should have a "$" prefix.  This differentiates it from a standard HTML or XML element.

Thus:
<$text text={{{ ... }}} />

and, for your desired literal "$", you would write:
$<$text text={{{ ... }}} />

enjoy,
-e

Reply all
Reply to author
Forward
0 new messages