Ability to sort based off result of customfunction?


We’re running a report for Cases Opened by Day of Week. I have a customfunction to group date_created by converted Monday, Tuesday, Wednesday etc.

Is there a way to sort the Day of the Week (Monday/Tuesday etc) chronologically instead of alphabetically?

One solution I though might work from the gitbook was to redefine when Monday then 1, when Tuesday then 2, and sort based on that, but it doesn’t seem to be working. Can kReporter sort based off of the customfunction result in that way?


That’s tricky one. Sorting is applied on group field label for display. Not the value itself.
You could rename the result like this:

I dragged field Date Created twice, applied custom SQL to get the weekday.
Then a php formula for week day names.

In present I hid Date Created Numeric (to avoid appearing below group name in fields list) and set sort flag