Hello everyone, first question in the forum so thanks for the help!
I have a repeating panel that is bound to a data table. The app data table has a date column. In my repeating panel, I have added a row header with a link to sort the column by date and am getting a weird result. When I sort the table by date, it doesn’t sort in ascending order backwards like you would expect:
It seems like the dates sort going forward in time for a specific year, then sort going backwards in time by the year. This leads me to believe the year is being sorted as the primary sort, and then month is being sorted next, and perhaps day after that. Here is my sorting code on the table that allows for switching the sorting method to ascend forward or backward:
def link_9_click(self, **event_args):
if self.sort_flag == 0:
self.repeating_panel_1.items = self.samples.search(tables.order_by(‘date’, ascending = False))
self.sort_flag = 1
else:
self.repeating_panel_1.items = self.samples.search(tables.order_by(‘date’, ascending = True))
self.sort_flag = 0
What I am looking to do is sort in a true fashion by date going through time rather than the weird sorting that is currently happening. Thanks for any suggestions!
Ethan