I have a gallery which consists of items from a SP list.
I have two columns in a gallery. One is named Facility. The other is the SP column for last modified.
I have a textbox used for searching the gallery.
I'm trying to apply ascending/descending sorting to both columns in the gallery.
When doing this for one column, I can do so without issue. When doing it for both, it seems to break.
The really weird part is this works in the designer but when I publish the app it does not.
Screen OnVisible:
Concurrent(ClearCollect(collAllSiteVisitDetails, SiteVisitDetails), ClearCollect(collAllSVTDetails, SVTList));
Set(FacilitySort, false);
Set(LastSort, "fac");
Set(LastUpdated, true)
Button for Facility Sorting OnSelect:
UpdateContext({FacilitySort: !FacilitySort});
UpdateContext({LastSort: "fac"})
Button for Last Modified Sorting OnSelect:
UpdateContext({LastUpdated: !LastUpdated});
UpdateContext({LastSort:"mod"})
Gallery Items:
If(LastSort="fac", SortByColumns(Search(SiteTracker, textSearch.Text, "Title"), "Title", If(FacilitySort, Descending, Ascending)), SortByColumns(Search(SiteTracker, textSearch.Text, "Title"), "Modified", If(LastUpdated, Descending, Ascending)))