cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KayBains
Helper I
Helper I

How to limit the selections a user can make in a Datacard Dropdown box in Power Apps

Hi

 

Created a Power App which uses a SharePoint List and one of the columns has a setting of ten options with multiple selections enabled.

In the Power apps, I have then created an Edit Form with Data cards.  I now would like to limit that the number of items selected by the user to say 5 - Is there a way this can be done

6 REPLIES 6
RandyHayes
Super User
Super User

@KayBains 

You really can't set a limit on the number of selected items in a Combobox.  You would need to implement another control where you could implement a restriction such as a Gallery.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Drrickryp
Super User
Super User

@KayBains 

In the DisplayMode property of the combobox:

 

 

If(
    CountRows(Self.SelectedItems) <= 4,
    Edit,
    Disabled
)

 

 

Would disable the combobox once 5 items were chosen.  You would need to have a button to reset the combobox  once 5 items were chosen and the user wanted to pick different ones.

 

RandyHayes
Super User
Super User

@Drrickryp 

A little hack-ish wouldn't you say??

RandyHayes_0-1629919915894.png

 

(BTW: Good to see you again...been hit and miss for a while)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Drrickryp
Super User
Super User

@RandyHayes 

Yeppers, sometimes real life interferes.  🤑

BTW, I loved your idea of dynamic table variables.  Are you going to make a video or follow up on that.  I redid my apps to incorporate the idea and get away from collections and it works great! 

Drrickryp
Super User
Super User

@RandyHayes 

Vide supra please.

RandyHayes
Super User
Super User

@Drrickryp 

Vide Supra...the doctor side of you is coming out strong!! 😂  

Yes, I have a partially complete video on the dynamic table variables...just need to find more than 24 hours in a day! I've got a lot of partial videos on the plate that really need time to complete.  

 

@KayBains  Sorry to ramble on in your Post...just two buddies here chatting while awaiting any response from you. 😁

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,863)