Get Variable then list in table issue

Hi,

i am using variable1 to hold a mathematical calculation , then referencing variable 1 inside another variable 2 which has a filter , then showing the outcome in a table , it is defaulting to 0 .

i noticed that if i reference a field instead of a variable in the filter it works, but that’s not i want .

so i believe the problem is in this part get<variable1>sum[]

but i am not really sure whats wrong , any help appreciated thanks :slight_smile:

<$let variable1={{{ [ {!!numberfield}divide[3]round[] ] }}}>

<$let variable2="[kin:tags:to<currentTiddler>tag[Completed]get<variable1>sum[]]">

<td><$text text={{{ [all[current]subfilter<variable2>] }}}/></td>

The get[...] operator is only for retrieving field values.

Try this instead:

<td><$text text={{{ [kin:tags:to<currentTiddler>tag[Completed]] :map[{!!numberfield}divide[3]round[]] +[sum[]] }}}/></td>
  • The first filter run finds all tiddlers that are “kin” to the currentTiddler and are also tagged “Completed”
  • The :map filter run converts the tiddler titles from the first filter run into numeric values, based on the numberfield/3 of each matching tiddler.
  • The third filter run sums the numeric values for output
2 Likes

Thank you eric as always works!