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 / AddColumns with Sort f...
Power Apps
Answered

AddColumns with Sort for ComboBox

(0) ShareShare
ReportReport
Posted on by 5,836 Moderator

I am having a problem getting the Sort to work correctly on a combobox that is displaying an added column.   The ComboBox is using the "DisplayName" column (added column) as the Display field and that works perfectly.   It will not sort however.

 

Sort(
 AddColumns(
 GroupBy(Holidays,
 "Country", "Region", "Year", "Result"),
 "DisplayName", Country & If(!IsBlank(Region), " - " & Region)),
 "DisplayName", SortOrder.Ascending
 )

   

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

    @JR-BejeweledOne 

    Consider the following change:

    Sort(
     AddColumns(
     GroupBy(Holidays,
     "Country", "Region", "Year", "Result"
     ),
     "DisplayName", Country & If(!IsBlank(Region), " - " & Region)
     ),
     DisplayName, SortOrder.Ascending
    )

     

    Or use the SortByColumns function:

    SortByColumns(
     AddColumns(
     GroupBy(Holidays,
     "Country", "Region", "Year", "Result"
     ),
     "DisplayName", Country & If(!IsBlank(Region), " - " & Region)
     ),
     "DisplayName", SortOrder.Ascending
    )

     

    I hope this is helpful for you.

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Ok, this is my DUH moment of the day.    Thank you

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

    @JR-BejeweledOne 

    Sometimes the mind blends everything together 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard