cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zse
Regular Visitor

Checkbox Not Running On Check for All Selected Gallery Items

Hi,

 

I have created an app with a checkbox in the gallery, and checkbox above the gallery to select all items. When I select the "above" checkbox to select all items in the gallery, the checks appear in all gallery selected items, but the On Check does not run for those selected gallery items. However, if I check the checkbox for individual items in the gallery, the On Check runs fine. (FYI - I want to write those checked items to a collection).

 

Is there away I can get the On Check code to run for gallery items when I use the top checkbox that selects all of the gallery items?

 

Thanks!

 

Default Value for gallery checkbox: If(Checkbox1.Value, true, false)

1 REPLY 1
StalinPonnusamy
Community Champion
Community Champion

Hi @zse 

 

There is no way to trigger all the checkboxes "OnCheck" events. Workaround is

 

Set "OnCheck" properties of Above/Global check box to

Clear(colGalItems); ForAll(Gallery1_1.AllItems,Collect(colGalItems, {Title: Title1.Text, ID : ThisRecord.ID}))

 

StalinPonnusamy_0-1632423656526.png

 

 

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,311)