Jan 31 2022 10:59 AM
I am using a lookup column in SharePoint to pull data into the list users use to create an order. Is there a way to order the entries in the lookup column? As an example if I have my lookup pulling in fruits in this order...Apple, Mango, Orange, Kiwi. But I want the lookup to display them as Orange, Mango, Kiwi, Apple...is there a way to reorder the entries so the users can view them in the preferred order in the lookup?
Thanks
Jan 31 2022 10:50 PM
Feb 01 2022 03:55 PM
Dec 20 2022 12:53 PM
Dec 20 2022 01:33 PM
@rkirk2k I WAS ABLE TO SOLVE THIS...
For whatever reason, PowerApps insists on presenting the choices in alphabetical order, EVEN THOUGH the list was created in the desired order (AND EVEN AFTER I went in and sorted the default view of the targeted list on the column holding the choices) So WEIRD.
So, I actually had the items in the list in the order I wanted.
Meaning - the ID field was in the correct order, but the column I was rendering continued to be displayed alphabetically. I had to force the choice control in PowerApps to sort based on the ID field in ascending order. It looked like this...
Sort(Choices([@LIST_NAME].LOOKUP_COLUMN),Id,Ascending)
Jan 12 2023 04:28 PM
@rkirk2k Awesome solution!
The only change I would suggest on your code is change the colons by semicolons: before this, PowerApps was pushing some syntax errors (at least in my current version at 2023, January).
So, instead of:
Sort(Choices([@LIST_NAME].LOOKUP_COLUMN),Id,Ascending)
I would suggest someone to also try what worked for me:
Sort(Choices([@LIST_NAME].LOOKUP_COLUMN);Id;Ascending)
Thank you!