Hello All,

I must be missing easy, but is there a way to easily reference the values 
of data tiddlers within filter notation? I'm trying to build a 'voting' 
mechanism for my multi-user wiki. My initial thought would be do have each 
"item to be voted on" as a data tiddler, and store the "score" under their 
username, so that I can tell how many people voted, and what the average 
score was. Each data tiddler would be tagged with the name of the vote.

So, I have for instance a data tiddler named "Idea 1", "Idea 2", "Idea 3" 
and so on. "Idea 1" would look like:
User A:1
User B:2
User C:2
User D:3
User E:1
etc.

Each data tiddler would be tagged "Vote on this" or something. Here's my 
code so far for the "Vote on this" tiddler:

<table>
<th>Idea</th><th>Vote Count</th><th>Avg Score</th>
<$list filter="[tag<currentTiddler>]">
<tr>
<td>{{!!title}}</td>
<td><$list filter="[all[current]indexes[]count[]]"></$list></td>
<td><$list filter="[all[current]indexes[]get[value]] +sum[]]"></$list></td>
</tr>
</$list>
</table>

The line with the get[value] +sum[] is where I'm stuck. Obviously sum 
doesn't get me all the way to average, but sum/count will work once I 
figure out the reference part. 

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/047d04d7-c3eb-4c0b-bcfa-d4477531a19c%40googlegroups.com.

Reply via email to