Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Custom order in a combo box? Is this achievable?

(0) ShareShare
ReportReport
Posted on by 537 Super User 2025 Season 1

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? 

  • KevinGador Profile Picture
    537 Super User 2025 Season 1 on at
    Re: Custom order in a combo box? Is this achievable?

    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
     )
    );

     

     




  • Verified answer
    mmbr1606 Profile Picture
    11,991 Super User 2025 Season 1 on at
    Re: Custom order in a combo box? Is this achievable?

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard