Thank you , and sorry for the late reply
ok maybe i need to add more context, i am not using a standard filter, i am using the kin filter, to find tiddlers that relate to the current tiddler i am querying by tags, then i am capturing numeric values in a field called “expense”, then adding them up .
this can be achieved as follows
<$set name=total-expense filter="[kin::to] :reduce[get[expense]add]">
<>
here is the problem, some of these tiddlers underneath, might have an additional field called “externalexpense” , this field holds one or more tiddler name(not a numeric value) ,and the idea is to
- use kin filter to find tiddlers with an externalexpense field
- capture the tiddler names in the externalexpense field, then
- do the same original operation against these tiddler names , find their kin , then find their “Expense” field values, sum them up and come back with a total
and hence why i was asking about how variables are stored, because the kin filter will return multiple results , which i want to store somehow, to be able query, and run additional filters against, and given my limited knowledge i am suspecting there is something i am completely missing on how to properly define /store variables
this is what i have, which is not working, its giving out wrong tottals
<$set name="getexternal-expense-total" filter="[kin:tags:to<externaltiddlers>]:reduce[get[expense]add<accumulator>]">
<$macrocall $name= getexternal-expense-total externaltiddlers={{{ [[kin:tags:to<currenttiddler>has:field[externalexpense]get[externalexpense]] }}} />
does this make any sense ?