Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Limit the number of items that can be selected in a combobox

(0) ShareShare
ReportReport
Posted on by 205
Is there a way to set the limit of items that a user can select in a combobox?
Categories:
  • Verified answer
    WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Limit the number of items that can be selected in a combobox
    Hi ccqn 
    If you put this OnChange of the Combo Box (example for a maximum of 3)
    If(
       CountRows(Self.SelectedItems) = 3,
       Notify("Maximum selections reached", NotificationType.Information),
       CountRows(Self.SelectedItems) > 3,
       Notify("Maximum selections exceeded", NotificationType.Error);
       Reset(Self)
    )
    it will provide a notice if the maximum, and clear the box if this is exceeded. There is no way of only clearing the last item.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • Suggested answer
    Inogic Profile Picture
    966 Super User 2025 Season 1 on at
    Limit the number of items that can be selected in a combobox
    Hi,

    Yes, we can set the limit of items that a user can select in a combo box.

    Add the below Fx formula on the OnChange property of the Combo box.

    If(CountRows(ComboBox1.SelectedItems)>1,Notify("you can not select more than 1 item",NotificationType.Error) & Reset(ComboBox1))

    In the above example if user will select more than one item he will get an error notification, but it will remove all the previously selected items from combo box.

    Hope this helps.
     
    Thanks!
    Inogic Professional Services: Power Platform/Dynamics 365 CRM
    An expert technical extension for your techno-functional business needs
    Drop an email at crm@inogic.com 
    Service: https://www.inogic.com/services/ 
    Tips and Tricks: https://www.inogic.com/blog/ 

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