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

Custom order in a combo box? Is this achievable?

(0) ShareShare
ReportReport
Posted on by 822 Super User 2025 Season 2

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,605 Super User 2025 Season 2 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
    822 Super User 2025 Season 2 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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard