Hi TW-Experts,
I try to sort a list by the first entry of another list.
This here is working well:
<$list filter="[tag<selector>sort[caption]]" variable="subfield">
But this here has only the first value as result and not the sorted list
<$list filter="[tag<selector>sort[list[fields]first[]]" variable="subfield">
Here is the complete code where it comes from.
It is a procedure that is generating a table from fields and the tiddlers are selected by a tag.
May be that is helpful to explain my problem.
Any help is appreciated and welcome
Thank you
Stefan
\procedure tids2table(selector, fields)
<$let
fields={{{ [<fields>!match[]] ~[[info/db_tables]get<selector>] }}}
>
<table>
<tr>
<th></th>
<$list filter="[enlist<fields>]" ><th><<currentTiddler>></th></$list><br/>
</tr>
<!--<$list filter="[tag<selector>sort[list[fields]first[]]" variable="subfield">
-->
<$list filter="[tag<selector>sort[caption]]" variable="subfield">
<tr>
<td>
<$link to={{{ [<subfield>] }}} >
Edit
</$link>
</td>
<$list filter="[enlist<fields>]" join=<<separator>> variable="field">
<td>
<% if [<subfield>get<field>is[tiddler]] %>
<$link to = {{{ [<subfield>get<field>] }}} />
<% else %>
<$text text = {{{ [<subfield>get<field>] }}} />
<% endif %>
</td>
<!--
</td>
-->
</$list>
</tr>
</$list>
</table>
</$let>
\end