cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gargoolgala
Resolver II
Resolver II

If gallery item is checked

Hi, I need to check if a checkbox in a gallery is checked.  If it is checked I will make a warning image visible.

 

There could be 1 record or many - each record could have the checkbox checked or not.  If any of them are checked I need to display the warning image.

 

I was thinking a ForAll loop through the items but cannot work out how to do it?  Any clues would be appreciated.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

That s a simple enough method IF the image was in the gallery.  I have a global image outside of the gallery.

 

It did get me thinking a bit more and I worked it out - there are always ways to do things in PA - you just need to look from the right angle 🙂

 

If(CountIf(DeviceGallery.AllItems,chkChosenEOSL.Value=true)>0,true,false)

 

Just count the items in the gallery if they meet the criteria and if > 0 then 1 of them triggers the true value for the visibility of the image

 

 

View solution in original post

2 REPLIES 2
CarlosFigueira
Power Apps
Power Apps

Within the gallery, if both controls (the checkbox and the warning image) are in the template (i.e., "children" of the gallery as shown in the tree view on the left-hand panel), then you can reference the checkbox from the Visible property of the image, and it will reference to the checkbox from the corresponding row.

 

Take a look at the attached app - it will show a gallery with a checkbox and an icon, which will only be visible if the checkbox is checked.

That s a simple enough method IF the image was in the gallery.  I have a global image outside of the gallery.

 

It did get me thinking a bit more and I worked it out - there are always ways to do things in PA - you just need to look from the right angle 🙂

 

If(CountIf(DeviceGallery.AllItems,chkChosenEOSL.Value=true)>0,true,false)

 

Just count the items in the gallery if they meet the criteria and if > 0 then 1 of them triggers the true value for the visibility of the image

 

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (35,032)