Is there a way to add custom ordering to a column of continuous numbers? I have a column that stores the start time for a given work order. The times are stored as numbers in 24 hr format with the leading 0's removed (e.g. 12:05 am = 500; 3:26 am = 32600; 7:14 pm = 191400). Each work order has multiple entries, and I am tabulating the data, grouping by work order, and displaying the minimum begin time as the true start time for the work order. The problem I have is that there are 3 shifts that work orders can be completed on. 1st shift is 7 am to 3 pm, 2nd shift is 3 pm to 11 pm, and third shift is 11 pm to 7 am. When a work order has an entry before midnight and another after midnight, the min function takes the entry from after midnight as the minimum (e.g. if there is a work order with entries at 11:15 pm and 2:00 am, the min will show up as 2:00 am rather than 11:15 pm).
I know I can create a custom ordering through the column info menu, but I need this to be done programmatically.
I know I can use << Set Property("Value Order", {Custom Order({...}), Common Order(0)}), but this requires that I know the values and enter them in the Custom Order brackets. The values in the data set will be changing week to week so I can't really specify what the order will be exactly, I just know if the value is less than 70000 it needs to be moved after 235959 and then ascend from there. Is there a way to do this more generally?
I thought about adding 86400 (one day in seconds) to values between 0 and 65959, but this will mess up code I have later on that converts the times into real time format