cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Djanan
Helper II
Helper II

Clear all checkboxes

I want to clear all of my checkboxes if they are onCheck with my Icon3. How can I do that. the select all is connected to checkbox1_17

clear checkboxes.jpg

6 REPLIES 6
Pstork1
Dual Super User III
Dual Super User III

Take a look at the solution in this post.

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Reset-Checkboxes-in-Gallery/td-p/101...

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Pstork1
Dual Super User III
Dual Super User III

I should add that the solution in that post will set the checkboxes back to their default.  If you want them to mirror the state of the single checkbox simply change the default property of the checkbox in the gallery to point to the default of the main checkbox.  That way when you check/uncheck the main box all the checkboxes in the gallery will reset to their default which will match the current state of the main checkbox.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Unfortunately I didn't work

Pstork1
Dual Super User III
Dual Super User III

It works for me.  Make sure you do all the following

 

1)Set the default property of the checkbox inside the gallery to CheckboxOutside.Value.

2) Set the OnSelect property of the checkbox outside the gallery to UpdateContext({resetCheckbox:true})

3) Set the Reset property of the checkbox inside the gallery to resetCheckbox



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@Pstork1 I tried with your solution but I didn't worked. Please check If I have missed something. 

 

checkbox inside.jpgonselect checkbox outside.jpgreset.jpg

Pstork1
Dual Super User III
Dual Super User III

Two things that are different about your setup than mine.

 

1) I'm just using a SelectAll checkbox outside the Gallery to both check or uncheck all the internal checkboxes.  That's typically the way this works in most UIs.  You are using a combination of a checkbox and an icon.

2) I said to set the default of the internal checkboxes equal to the external one.  You've got the default set to two functions and If statement and setting the icon to false.  You can't use a compound statement there.  It has to simply evaluate to either true or false.  The If statement should work, but its not necessary.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

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 Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,251)