when using nsort on new values (e.g. value::index note :: is a character used to create new entries) it fails.
One solution is as below, but for large number index - value (e.g 200 or more) the solution is very slow
This solution contains
1. a populate macro to list all values
2. a wikify and list widget let sort values
3. a lookup macro to find index(s) for a value
\define
dataTiddler() myData
\define myfilter() [<dataTiddler>indexes[]]
\define populate()
<$list filter="[subfilter<myfilter>]">
<$text text={{{[<dataTiddler>getindex<currentTiddler>]}}}/>
</$list>
\end
\define lookup-index(val)
<$list filter="[subfilter<myfilter>]" variable=idx>
<$list filter="[<dataTiddler>getindex<idx>] +[match[$val$]]">
<tr>
<td><$link to=<<idx>> /></td><td> $val$ </td>
</tr>
</$list>
</$list>
\end
<table>
<$wikify name=u text=<<populate>> >
<$list filter="[enlist<u>nsort[]]">
<$macrocall $name=lookup-index val=<<currentTiddler>> />
</$list>
</$wikify>
</table>
The above can be tested in
https://tiddlywiki.com/ if one creates a data tiddler with the myData title containing the data of the previous post.
Question: as stated above this solution is very slow for large numbers of data (index-value pairs). What alternative solution do you propose?