Suppose you have a custom column like this:
[=tc.name:2]
Sorting on this column will sort on the whole name and not on the second character of the name.
TC7.03 Sort on custom column with substring of plugin value
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I have considered this, but it would break the sorting by numeric values like size or date/time...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
When someone uses a sub string he in most cases wants to change the sort order. Maybe you can leave the sort order like it is now when field formatters are used, but change the sort order when a sub string is used.ghisler(Author) wrote:I have considered this, but it would break the sorting by numeric values like size or date/time...
It also makes sense considering a sub string of a number or date as a string instead of a number or date.
Another possibility is to give the user the possibility to supply a sort key. For example using the following syntax: [=pluginname.fieldname.unit|sort_key].
(Like it is done with categories in the wiki: [[Category:category_name|sort_key]])