cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Impactful Individual
Impactful Individual

CHECKBOX ON GALLERY AND SHOW OR NOT A BUTTON BASED ON THAT CHECKBOX

Hey microsoft users, okay?

 

I have a gallery with several items and each item has a checkbox, as below:

 

gallery.png

 

I want a button to be visible if one or more checkboxes are selected and if the user does not check any, the button is not shown:

 

vissiblw.png

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Gorilla_8 

On your Button visible property use this formula:

CountRows(Filter(yourGallery.AllItems, yourCheckBox.Value))>0

 

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!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@Gorilla_8 

On your Button visible property use this formula:

CountRows(Filter(yourGallery.AllItems, yourCheckBox.Value))>0

 

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!

View solution in original post

Gorilla_8
Impactful Individual
Impactful Individual

 

@RandyHayes 

Yes. Did work fine! Thanks

 

@Gorilla_8 

You are trying to use the AllItems property inside of a Gallery.  

You originally stated that you were trying to make a button visible.  In this picture you are showing that you are trying to make the Checkbox visible or not.  That, by itself, would not work as the checkboxes would never be visible.

In your original post picture you highlighted the Blue button - Outside of your Gallery.  The understanding was that you wanted to control the visibility of that.

If so, then my original formula still holds.  But trying to change the visibility of the checkboxes is not what you originally wanted.

 

Please clarify.

_____________________________________________________________________________________
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!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,336)