Hello I have a Gallery that needs to be sort by STATUS and DATE
The left one is the raw and the right side should appear on gallery.
What code should I use? I'm currently using SortByColumns
It looks like using sortbycolumns doesn't like you sorting by multiple criteria if you use a bespoke order like you are... Try the below this worked for me on my dataset
Sort(SortByColumns(Filter(myDB, If(IsBlank(myRequestAssignedToMe), Status= "Open" Or Status= "In Progress", User= myRequestAssignedToMe)), "Status", ["In Progress","Open", "Returned", "Fulfilled", "Completed", "Cancelled"]), "DUEDATE", Descending)
Still the same 😞
I think you are just missing a comma after "Cancelled"] -- try the below
SortByColumns(Filter(myDB, If(IsBlank(myRequestAssignedToMe), Status= "Open" Or Status= "In Progress", User= myRequestAssignedToMe)), "Status", ["In Progress","Open", "Returned", "Fulfilled", "Completed", "Cancelled"], "DUEDATE", Descending)
SortByColumns(Filter(myDB, If(IsBlank(myRequestAssignedToMe), Status= "Open" Or Status= "In Progress", User= myRequestAssignedToMe)), "Status", ["In Progress","Open", "Returned", "Fulfilled", "Completed", "Cancelled"] "DUEDATE", Descending)
can you paste your code?
Mine It says invalid argument.
Hello you are using the right function so in mine I have a column called Date and one called Title..... Because I have put Date first it will sortby the date first then the title.
If this was helpful please mark as answered 🙂
Thanks
M