Summation of fields in another tiddler

HI,

in the below thread a solution was provided to sum the values of multiple fields within the current tiddler

The solution was
[fields[]prefix[value]] :map[<…currentTiddler>get] :and[sum[]]

i am trying to get the sum of field values but for another tiddler (single not multiple tiddlers, just the sum of one other tiddler)

i used the same code ,just replaced the <> with another defined variable <> which references the target tiddler , but it didnt work , , also how do i get around the part with the 2 dots …currentTiddler , i also replaced it with …<> with no luck

Since the existing filter works with the <currentTiddler> variable, one way to have it work with another tiddler would be to enclose the entire bit of code within a <$tiddler> widget, like this:

<$tiddler tiddler="SomeTitle">
   ...
</$tiddler>

Thus, everything inside the <$tiddler> widget can still refer to the <currentTiddler> variable, while actually referencing the “SomeTitle” tiddler’s fields.

Thanks Eric

Worked ! :slight_smile: