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

Notifications

Announcements

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,297 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,297 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard