Can't get this to work properly; maybe you can help.
I have a collection that I want to sort on two different fields independetly: name and date. I created a header pver the top of the gallery and inserted a button for each field with a "symbol" in the button of either an up or down arrow to indicate when the order was ascending or descending. Maybe dis regard that for this question other than to say the symbol reverses properly when the button is selected.
What doesn't work is the display of gallery records. Whatever order was displayed remains the same.
I tried the following action for the button select:
SortByColumns(colSOHdr, "Date", If(varDatetSort, SortOrder.Ascending, SortOrder.Descending))
and set items for the gallery to colSOHdr.
I also tried items set to the SortByColumns and then just Sort using the same expression.
Next, for the button on select, I tried starting with a ClearCollect and re-doing the collects uned to create the collection; the onstart expression does a lot of filtering and works as expected, but when this is replicated by the button, the gallery display does not change no matter what the value of items is.
I full y believed that a ClearCollect(colSOHdr, SortbyColimns("Date", <order>)) would then show the gallery in the new order but alas no. Certainly error on my part, but what?