The SetWidget now has a filter option. I seem to recall that the output is as an array. Perhaps you could replace the <$list> with a <$set> ?
For CarboCommander (http://carbocommander.tiddlyspot.com/) I added a couple macro's to Evan's kit to allow the aggregation of numbers into variables. It may be klunky (you have to use 3 different macros to initialize, accumulate, and report "variables" ) The variables in this case refer to identifying strings rather than your usual TW variables. Good luck! -- Mark On Monday, June 18, 2018 at 8:54:10 AM UTC-7, hubertgk wrote: > > Hi, > > Using Evan Balster's <<formula>> macro, I'm trying to sum the numerical > output of a <$list> filter but each of the list items is processed > separately. > > For example, if the output of my list is 2 2 1 and I try to sum that with > 5 using <<formula>>, then each of the arguments is summed in isolation and > I get "7 7 6" (2+5, 2+5, 1+5) instead of "10" (2+2+1+5). > > So my question is, how can I transform the output of a list filter (all > returned arguments) into a single array containing those arguments? > > Here's my code. I've provided more of it for context but it's not > necessarily relevant to my question (I'm having a list of values returned > based on a search performed on indexes in a data tiddler. The values are > numbers and the output is a list). > > \define test() > <$list filter="[[_data]getindex[$(matching_indexes)$]]" variable= > "dataTiddler"> > <$set name=arguments value=<<dataTiddler>>> > <<test2>> > </$set> > </$list> > \end > > \define test2() > <<formula "sum(($(arguments)$), 5)">> > \end > > <$set name=matching_indexes value=searchterm> > > <<test>> > > </$set> > > > Thank you very much for your ideas! > > Best, > > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/b2fb561a-91b2-4148-ae74-4abd5246d651%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

