Hi guys, The following issue occurs when i set the sort “carnumber” to ascending: The car number is currently a string (because of integration with another software). Is there any way to set rules to a sort function? Because our database is messy, the car numbers start at around 270. I would like them to appear first, instead of the 1.xxx Second question: I also have empty values that appear on both ascending and descending datetimes. Is there a way to make a rule for empty values? Thanks for taking the time to answer this!
I'm not sure if it's the best way, but one way to solve it would be:
Create a new attribute and fill it with the car number converted to a decimal
If the original value is empty, set it to a really high or a really low number (e.g. 999999999999 or -99999999999)
Use the widget Listview Controls (specifically, the “Header sort”). This allows you to sort the grid by an attribute that isn't necessarily visible, so you can sort by your new attribute. Unfortunately empty values will still be at the top or bottom depending on your choice in step 2.
Otherwise, it might be worth making two grids with datasource microflows, one that sorts ascending and one that sorts descending (where you can also deal with empty values). You could toggle which one is shown by letting the user click microflow buttons. It's an ugly solution, but maybe someone else has a better one :-)