Sorting a field (as part of using it in Shiraz Dynamic Tables)

Hello, I am using @Mohammad’s Shiraz dynamic table and struggling to sort one particular column due to how the underlying tags field is mapped.

My use case is for personal collection management. As seen in my wiki:

Further down the same table…

All tiddlers are tagged with game, which is excluded from view using the Exclude Tags version of the macro.

There should not be a gap there.
What is happening: The tiddlers at the top of the table are tagged [[all-time games]] games, while the tiddlers further down are games [[all-time games]]. Shiraz is doing a simple sort of the tags field in alphabetical order, hence the inaccuracy.

I’d rather not edit all the entries manually. Moreover, this may come up again in future as the TiddlyWiki interface for editing tags always sorts tags on its own.

This leads me to two possible solutions:

  1. Can I force Shiraz to re-arrange the tags field before sorting it, similar to how the TW interface does it?
  2. Alternatively, is there an easy way to sort the underlying field data, and store it sorted?

This is a TiddlyWiki issue, TiddlyWiki stores tags in order they added (every tiddler has a hidden field tags)
But it shows tags sorted by title. So, the sort in Dynamic Tables works as expected but TW shows them in its own way!

See [IDEA] Store Tags as Displayed · Issue #8228 · Jermolene/TiddlyWiki5 (github.com) and comments by @PMario, and @jeremyruston

2 Likes