Hello everyone,
Hoping someone can assist as I have tried other user's remedies but they don't seem to work for me. I have a SharePoint list where it only pulls items to the gallery where the Review Complete column is blank. This works perfectly however I want the results in the gallery to also be sorted in alphabetical order by another column (a choice field) in the same list.
This is what I currently have but not sure how to incorporate the sort feature:
Filter('Hotel Reviews', (IsBlank('Review Complete')))
Solved! Go to Solution.
@BCBuizer Okay i think i got it!
Sort(Filter('Hotel Reviews',(IsBlank('Review Complete'))), Hotel.Value)
I changed it from "SortByColumns" to Just "Sort" and then added ".Value" after the column I wanted it sorted by.
I am very new to Powerapps. Is there a reason why your original formula didn't work but this did?
You can nest your filtered results in a SortByColumns function:
SortByColumns(
Filter('Hotel Reviews', (IsBlank('Review Complete')))
, "Other Column")
When i do that, the gallery comes up blank for some reason with no results?
@BCBuizer Okay i think i got it!
Sort(Filter('Hotel Reviews',(IsBlank('Review Complete'))), Hotel.Value)
I changed it from "SortByColumns" to Just "Sort" and then added ".Value" after the column I wanted it sorted by.
I am very new to Powerapps. Is there a reason why your original formula didn't work but this did?
SortByColumn(AddColumn(Filter('Hotel Reviews', (IsBlank('Review Complete'))),"OtherText",OtherColumn.Value),"OtherText",Ascending)
Changing from SortByColumns to Sort probably didn't fix it, but adding the ".value" did.
Looking at the syntaxis for SortByColumns, it needs a string to sort. Since the Hotel column is a of a record datatype, you can't use that "as is", but adding the ".value" does return a string and hence works.
More info on Sort and SortByColumns can be found here:
Sort and SortByColumns functions in Power Apps - Power Apps | Microsoft Docs
User | Count |
---|---|
251 | |
102 | |
94 | |
47 | |
37 |