Hello there!
I have a tiddler with a field named after the variable <adv>
, in a dictionary tiddler named after the variable <advbook>
. The <adv>
field holds the name of other tiddlers sometimes followed by a number, sometimes not, each separated by a comma:
Song, Dance 2, One College Only
Each of those tiddlers (not the numbers) have a field named modifier-value
.
I’m trying to sum up all the modifier-value
of those. I’m going for a two-prong approach:
- first summing up those tiddlers whose name isn’t followed with a number,
- then those that are (for these I need another formula multiplying the number by another field called
modifier-per-level-value
).
I’m stumbling on the 1. already with that approach:
<$set name="unlevelablesvalues" filter="[<advbook>get<adv>split[, ]!regexp[\d+$]]:map[get[modifier-value]]">unlevelablesvalues: (<<unlevelablesvalues>>)
<$list filter="[<unlevelablesvalues>split[ ]] +[sum[]]" variable="unlevelableSum">(Sum of unlevelables: <<unlevelablesSum>>) </$list></$set>
Thanks to the little debug parts, I saw that the $set widget does the job I intended it to do, outputing a list of the form [-40 -40 -40]
. However, the $list widget returns 0. I’m guessing my filter run on the list established by the $set widget is wrong.
Can somebody explain to me why? Thanks in advance
Update: Fixed, as often, just a typo in the name of the variables -_-'