Hi,
Is there a way to get the position of an item in a "list field"?
More info:
Recently I've discovered the
"nth" filter operator, and one of the use case I immediately think about was to "iterate" through items in multiple related "list fields"
Take the following example (not a real one, just to get the idea clear):
If a family needs to manage its friends, each family member's Tiddler will have the following fields:
1- friend-names : "list field" contains ALL friends
2- friendships-start-date : "list field" where the "position" of the date determine the friend's names
3- friendships-meter : "list field" where the "position" of the % determine the friend's names
Ex.
friend-names : [[alex]] [[andy]] [[john]] [[evan]]
friendships-start-date : [[Mar2015]] [[Dec2017]] [[Nov2016]] [[Feb2011]]
friendships-meter [[70]] [[30]] [[60]] [[90]]
Now I can use the filter "[contain:friend-name[alex]]" to get all family members who is a friend with "alex".
And if I know the <<position>> of "alex" in the "friend-names" field, I can get the rest of the data corresponding to it for the currentTiddler using a filter like:
"[all[current]get[friendships-meter]enlist-input[]nth<position>]"
Regards