Skip to main content

Notifications

Power Apps - Building 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?

  • Re: Unable to sort with Choices field

    @Anonymous

    You could also drag and sort the choice items from the Choices menu in Modern View.

  • RandyHayes Profile Picture
    RandyHayes 76,287 on at
    Re: Unable to sort with Choices field

    @brandon_murphy 

    Yes, you can do such a sort, but you need to sort by an alternative means.  For example, the alphabetical is good to sort on, but you need an additional column to sort as well.  Then you would use the SortByColumns and provide but columns for sorting.

  • Re: Unable to sort with Choices field

    Is there a way to place one of the items in the list at the end but keep the remaining items in alphabetical order?

  • Re: Unable to sort with Choices field

    This worked great. Thank You for the clarification

  • NickAnderson Profile Picture
    NickAnderson 6 on at
    Re: Unable to sort with Choices field

    Same/similar issues. First off, please forgive my lack of knowledge.

    I have created a list in "lists" that is on sharepoint. 

    I had the system try and build an app that i have been modifying/adding to. 

    On the home screen, i have a button navigating to a list view screen. On said list view screen, i want to have drop down choices that will filter results accordingly. When/if no choice is made, it will show everything. 

    Thanks for the help!

  • A-z-h-a-r Profile Picture
    A-z-h-a-r 4 on at
    Re: Unable to sort with Choices field

    If you are using Dataverse Choices then you can refer this piece of code 
    Sort(Choices('int type'),Left(Value,1),Ascending)...

  • Re: Unable to sort with Choices field

    Thank tou @RandyHayes . I had the same issue. 

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

  • RandyHayes Profile Picture
    RandyHayes 76,287 on at
    Re: Unable to sort with Choices field

    @Anonymous 

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

  • Re: Unable to sort with Choices field

    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.

  • simms7400 Profile Picture
    simms7400 829 on at
    Re: Unable to sort with Choices field

    @RandyHayes  That worked perfectly!!!!

     

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

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard