Sorting a column by a value different than visible display
Sorting a column by a value different than visible display
Hi there everyone!
I've got a column I'd like to sort. It's a time spent row and It's run through a function to make seconds human readable so instead of 613, it shows "10 minutes, 13 seconds". I tried to place the seconds in a span around the human readable number
span class="4201"
But it's not working, it will still sort like the following:
10 minutes
9 hours, 10 mins
8 minutes
7 days, 1 hour, 45 mins
How would I get this column to sort by the seconds without making it visible in the td?
Thanks for your time!
This question has an accepted answers - jump to answer
Answers
You can use Orthoganl Data for this. Simply return the seconds value for the
sort
andfilter
types. Then return the human readable for everything else.Kevin
Alternatively, return your seconds in a hidden column and use it for sorting from your "human" column.
You guys are incredible. I can't thank you enough for all the help!