cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
tperry
Frequent Visitor

Disable button until all checkboxes in a gallery = true

I want to disable or make invisible a "Submit" button until all checkmarks in a gallery are marked true.
I was hoping OnVisible would be as easy as:
If(Checkbox1.Value = true,true,false)
OR
DisplayMode:
If(Checkbox1.Value = true,Edit,View)

However, as soon as you mark just one true, it makes the button clickable. 

Any ideas on what I should do here?

3 REPLIES 3
EricLott Resident Rockstar
Resident Rockstar

Re: Disable button until all checkboxes in a gallery = true

You can use the And() function to use the formula you suggested, but instead of Checkbox1.Value, you'd use And(Checkbox1.Value, Checkbox2.Value, Checkbox3.Value... etc)

tperry
Frequent Visitor

Re: Disable button until all checkboxes in a gallery = true

That could work!

But then I guess then I need to limit my gallery to a certain number. 

Could you tell me how to do that?

Also, the app doesn't seem to recognize the other checkboxes at all. 

EricLott Resident Rockstar
Resident Rockstar

Re: Disable button until all checkboxes in a gallery = true

You can use FirstN() to get the first N rows in a source.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,115)