Hello Dave,
That is no trivial thing you’re trying to do. Well, maybe somebody has a trivial solution.
But what a great “Brain Age” game !!!
So in the meantime, download the attached and drag into tiddlywiki.com to import the tiddlers and give you an opportunity to study what I’ve done.
I’ve pasted the code below as reference for anything murky that needs some serious explaining.
It is not a trivial affair to require dynamic identification of fields that need to be summed.
Much easier to specify the exact fields. Then you have a simple filter like “[get[aaa1]] [get[aaa2]] … etc. … [get[aaaX]] +[sum[]]”
Since we do not know the exact field names, then we have to dynamically build that filter above. (As per the highlighted magic in the code below)
Ignoring the starting and ending “pre” tags. I’m trying that to see if the code below shows up okay in TiddlyTalk (which is finicky with this kind of stuff.)
\define p1() [get[
\define p2() ]]
\define p3() +[sum[]]
<$list variable="thisField" filter="[fields[]regexp[aaa]]">
sum of <> values:
<$list filter="[getsum[]]">
{{!!title}}
**<$vars thisDynamicFilter={{{ [fields[]regexp[aaa]addprefixaddsuffix] [] +[join[ ]] }}}>**
<$list filter={{{ **[]** }}}>
''total:'' <>
SuperDuperSumming.json (790 Bytes)