I've created a new screen and gallery in my app and am trying to sort the data shown in the gallery in ascending order. I've used "SortByColumns" extensively in my app and don't have trouble in any other form. But on this new form it looks like "If(SortDescending1, Ascending, Descending) " is not acceptable to the "SortByColumns" function.
This is what I'm trying to use:
If(ComboBox2.SearchText = "",
TruckStockInventoryDB,
SortByColumns(Filter(TruckStockInventoryDB, Title = First(ComboBox2.SelectedItems).Title Or Title = ComboBoxSearchText.Text), "Title", If(SortDescending1, Ascending, Descending)))

I've tried using just "Ascending", and while that does not produce an error it does not actually sort my gallery.
What am I missing?