Hi everyone! I have 2 SharePoint lists: List1-with the main data and List2- with the list of countries. I created a Lookup column in List1 connecting with List2.
I was wondering if is there a way to custom-sort the list of countries in the PowerApp, for example, UK and USA at the top of the list, and the remaining countries keep in alphabetic order.
At the moment all countries are listed in alphabetic order.
SortByColumns will let you put the 2 up front.
SortByColumns( YourList,"{YourColumn}",["UK","USA",SortOrder.Descending] )
You could add a switch expression to perhaps have a top 10 list and then the remaining will be sorted alphabetically
Sort(["UK","New Zealand","Australia"],Switch(Value,"UK","0","Australia","1",Value))
Or
SortByColumns(AddColumns(["Italy","UK", "Australia","Denmark"] As Countries, "CustomSortOrder",LookUp([{SortOrder:"1",Country:"UK"}], Country=Countries.Value).SortOrder),"CustomSortOrder",SortOrder.Ascending,"Value")
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,957
Most Valuable Professional