Custom sort order for dataview table

Yes, I think the best way is via JS… but I don’t know js.
So, I give you a tricky solution to dql.
Let’s say your field-pairs are:

kyky:: now
kyky:: next
kyky:: later
kyky:: someday

And you want to sort the results in this order.
You can try something like this

...
SORT choice(kyky = "now", 1, choice(kyky = "next", 2, choice(kyky = "later", 3, choice(kyky = "someday", 4, "other")))) ASC

The alternative: wait for a js expert answer. :slight_smile:

1 Like