Hi ,
if i have tiddlers tagged with Tag1
and have field1
and tiddlers tagged with Tag2
that have field1 and field 2
can i run a filer that would do the follwoing
for each tiddler tagged with Tag1, find all Tag2 tiddlers that have a smaller value in field 1 ,then sum their field 2 values
so for example
- Tiddler A Tags= Tag1 Field1= 2
- Tiddler B Tags= Tag1 Field1= 1
- TIddler C Tags= Tag1 Field1= 4
- Tiddler D Tags= Tag2 Field1= 3 Field2=1
- Tiddler E Tags= Tag2 Field1= 1 Field2=1
- Tiddler F Tags= Tag2 Field1= 1 Field2=2
1.TiddlerA has a higher value in Field1 compared to TIddlerE and Tiddler F but not TiddlerD , so the filter should return 3 (sum of field2),
2.Tiddler B has a value in field1 that is not greater than any tiddlers tagged with Tag2 so it should evaluate to 0
3.tiddler C has a value in field 1 greater than all tiddlers tagged with tag2 , so it should evaluate to 4
i have done this
<$set name= "var1" filter = "[tag[tag1]get[field1]]">
<$list filter ="[tag[tag2]] :filter[get[field1]compare:number:lt<var1>] :and[get[field2]sum[]]" variable = "var2">
it doesnt work , is it possible to do this ?, so can i have the result come as 3 0 4
for which i might even sum[] them together if i choose to ?
thank you verymuch