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

Limit the number of ckeckbox checked ?

Hi,

 

I have some chechbox in a customize gallery. I want to limit the number of possible checkbox checked to 5.

 

How it is possible ? 

 

Thank you very much.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Limit the number of ckeckbox checked ?

Hi @axellefevre

 

Here is one way to do it:

 

  1. Outside the gallery, on any part of the screen (you can even make it invisible), create a text box (TextBox1) with the following Text property:
    CountRows(Filter(Gallery1.AllItems, Checkbox1.Value))
  2. Set the Disabled property of the checkbox to this:
    Value(TextBox1.Text)>=5 && !Checkbox1.Value

Voila, please let me know if it works

View solution in original post

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: Limit the number of ckeckbox checked ?

Hi @axellefevre

 

Here is one way to do it:

 

  1. Outside the gallery, on any part of the screen (you can even make it invisible), create a text box (TextBox1) with the following Text property:
    CountRows(Filter(Gallery1.AllItems, Checkbox1.Value))
  2. Set the Disabled property of the checkbox to this:
    Value(TextBox1.Text)>=5 && !Checkbox1.Value

Voila, please let me know if it works

View solution in original post

Highlighted
Helper I
Helper I

Re: Limit the number of ckeckbox checked ?

It's works ! Thank you very much !

Highlighted
Helper IV
Helper IV

Re: Limit the number of ckeckbox checked ?

Hi, I am unable to see the Disabled property in the checkbox. Could you please help on the 2nd step

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,281)