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

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,970)