In my Kansas Railroad wiki, I have a tiddler to display all the values for the field statefiled along with how many railroads are associated with that statefiled value. The code is below:
<table class="table-borderless">
<$list filter="[tag[Railroads]get[statefiled]unique[]]" variable="StateFiled">
<tr>
<td><<StateFiled>></td>
<td style="text-align: right;"><$count filter="[tag[Railroads]statefiled<StateFiled>]"/></td>
</tr>
</$list>
<tr>
<td>Missing State</td>
<td style="text-align: right;"><$count filter="[tag[Railroads]!has[statefiled]]"/></td>
</tr>
</table>
The output looks like this:
What I would like to do and can’t quite put my finger on how to do it is to sort this output from high to low. For example, Kansas would be first, followed by Missouri, then Oklahoma, etc. I can’t help but think there is a slick way of doing this, but I’m not coming up with it. (Note: the Missing State row is separate and not included in this question.)
Thanks so much in advance!