web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Unable to sort with Ch...
Power Apps
Answered

Unable to sort with Choices field

(0) ShareShare
ReportReport
Posted on by 829

Hello Folks -

 

I currently have a field in SP that has a list of values. I'm levraging it in PowerApps with the following syntax:

Choices(rdTargetChangeReq.nIpOwner)

However, I want to be able to sort this column alpabetically.  I tried this with no success:

Sort(rdTargetChangeReq,nIpOwner.Value, Ascending)

Any ideas? Do I need to combine both of those functions?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @simms7400 

     

    Because that is a Choice column, you'll need to pull the value into a text column that you can sort on.

    Try this formula:

    SortByColumns(AddColumns(rdTargetChangeReq, "columnValue", nIpOwner.Value), "columnValue", Ascending)

    I hope that helps you some.

  • simms7400 Profile Picture
    829 on at

    @RandyHayes  Thank you!

     

    I added the formula in the "Items" box on my form but there is an error saying "The specified column 'Value' does not exist".

     

    Am I doing anything wrong?

  • simms7400 Profile Picture
    829 on at

    In your suggested formula, should I be replacing "columnvalue" with anything?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @simms7400 

    Where are you seeing the error for the "Value"?  The formula should be used exactly as it was.  You can change the "columnValue" name to whatever you want, but you can also just leave it as-is.

  • simms7400 Profile Picture
    829 on at

    @RandyHayes  - here you go:

     

    Error.png

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @simms7400 

    OH~!!!!  You're doing this on a DataCard.  My misunderstanding, thought you had a Gallery you were sorting.

     

    In that case, you need to change the Items property of the Combo Box in your datacard to :

     

    Sort(Choices(rdTargetChangeReq.nIpOwner), Value, Ascending)

    Sorry I misunderstood.

     

     

  • simms7400 Profile Picture
    829 on at

    @RandyHayes  That worked perfectly!!!!

     

    Thank you so much - have a great weekend!!!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    None of this worked for me.  For anyone struggling with the same, ultimately what worked for me was to go in the Solution area -> Classic View -> locate your Option List.  Go into the Option list and sort it alphabetically in that Classic view area and the Publish that Choices list again.  I tried everything and more in this thread and nothing worked except doing this.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    That is because you are using dataverse and not SharePoint.  Choices columns in SharePoint can be sorted as mentioned in this thread. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank tou @RandyHayes . I had the same issue. 

    Also, i have found this great article Power Apps Choices Function with Examples - SPGuides

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard