I need some help adding a Sort to a filtered list in a Gallery.
I've added an Icon control that both flips as it's used and properly sets a Context variable to DateAscending or DateDescending.
Now that I have the context correct, I need to modify the Items property for the gallery.
The current statement is:
Switch(
type,
"All", Tickets,
"Requests older than 3 days",
Filter(
Tickets,
// Not(datetype in [DateCreated, DateClosed]) &&
Not(DateCreated in [Text(Today()), Text(DateAdd(Today(), -2)), Text(DateAdd(Today(), -1))] ||
DateClosed in [Text(Today()), Text(DateAdd(Today(), -2)), Text(DateAdd(Today(), -1))])
),
"Requests opened today", Filter(Tickets, datetype in DateCreated),
"High Priority", Filter(Tickets, Priority = "High"),
"Requests closed today", Filter(Tickets, datetype in DateClosed),
"Search", Filter(Tickets, MySearchText in Subject || MySearchText in Description),
"My Requests", Filter(Tickets, Owner = User().FullName),
Filter(Tickets, type in Status)
)
I know there are delegation issues but we'll manually control the Tickets table to stay under 2K.
Can someone help with adding a sort to this based on DateAscending/DateDescending context? I'm going to add additional sorts as well but I hope I can figure that out after being provided the first solution.
Thanks all.