I've seen this problem expressed in a number of posts. I solve this problem 
(How to access the place number of the current item from within a list) as 
follows

You'll have to do some parsing of the variables to understand how this 
works. I've had to rewrite this method in many different ways to fit the 
use-case so its more important to understand how to get a result. I've also 
written a filter that returns a number rather than a list that can be used 
in these cases and is sometimes better. 
http://cpashow.tiddlyspot.com/#%24%3A%2F_cpa%2Fmacros%2FfilterCount.js

1. In the below, $filter expression$ can be any valid filter expression 
minus the leading and training brackets)
2. The allbefore operator returns the list of items that are before the 
item passed to the operator
3. The variable <<item_name>> is the current item being processed
4. Therefore <$count filter="[[$filter expression$]allbefore<item_name>]" 
/> returns the number of items before the current item (current item number 
- 1)
5. The append operator adds an item to the end of the list
6. *grxnxtlg* is the name of a tiddler that is most likely not in the list
7. Therefore <$count filter="[[$filter 
expression$]append[*grxnxtlg*]allbefore<item_name>]" 
/> returns the current item number
8. Therefore <$set variable="current_count" filter="[[$filter expression$]
append[*grxnxtlg*]allbefore<item_name>filter_count[]]" > returns the 
current item number as a variable within the $set expression

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/29b44ec9-c864-438c-9c45-cc4c9f404131%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to