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 / Custom order in a comb...
Power Apps
Answered

Custom order in a combo box? Is this achievable?

(0) ShareShare
ReportReport
Posted on by 836 Moderator

Hello everyone that is eager and willing to help 

I have a current scenario that I want to have the items of my combo box in a custom order

here is my formula in the on select property of my combo box

ClearCollect(
 colOfficeLocCustomOrder,
 Sort(
 Ungroup(
 Table(
 {Data: Table({Value: "Any - No Preferred Office", Order:1},{Value: "Other Location", Order: 400})},
 {
 Data:
 Distinct(Filter('DATA SOURCE',
 SSL = DataCardValueSSL.Selected.Value && 
 SMU = DataCardValueSMU.Selected.Value && 
 Rank = DataCardValueRank.Selected.Value),
 'Office Location') 
 }
 ),
 "Data"
 ),
 Value
 )
);

here is my formula for the items property of my combo box:

SortByColumns(
 colOfficeLocCustomOrder,
 "Order",
 SortOrder.Descending
)


notice here that I added another column to the any preferred office and other location because I want the any preferred no office to be located at the first of the combobox items and the other location be at the last. I was wondering if I can sort them out however those that were filtered did not have any "Order" column.

how can I achieve this? 

Categories:
I have the same question (0)
  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @kej 

     

    you can try something like this:

     

    ClearCollect(
     colOfficeLocCustomOrder,
     AddColumns(
     Distinct(
     Filter(
     'DATA SOURCE',
     SSL = DataCardValueSSL.Selected.Value && 
     SMU = DataCardValueSMU.Selected.Value && 
     Rank = DataCardValueRank.Selected.Value
     ),
     'Office Location'
     ),
     "Order", 
     2 // Assigning a default order for filtered items, you might need to adjust the logic to dynamically assign order based on your exact needs
     )
    );
    
    // Add the fixed items with their specific orders
    Collect(
     colOfficeLocCustomOrder,
     {Value: "Any - No Preferred Office", Order: 1},
     {Value: "Other Location", Order: 400}
    );
    
    // Now sort the collection for the ComboBox Items property
    Sort(
     colOfficeLocCustomOrder,
     Order,
     Ascending
    );
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • KevinGador Profile Picture
    836 Moderator on at

    Thank you for the help! this solved it however not as I wanted do you have any idea how I can sort the filtered data to be alphabetically
    arranged? 

    EDIT: 

    I solved the other problem with this one

     

     

    ClearCollect(
     colOfficeLocCustomOrder,
     AddColumns(
     Sort(
     Distinct(
     Filter(
     'DATA SOURCE',
     SSL = DataCardValueSSL.Selected.Value && 
     Competency = DataCardValueSMU.Selected.Value && 
     Rank = DataCardValueRank.Selected.Value
     ),
     'Office Location'
     ),
     ThisItem.OfficeLocation,
     SortOrder.Ascending
     ),
     "Order", 
     2
     )
    );

     

     




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 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard