How to reset checkbox control in Gallery in PowerApps

In this blog we will see how to reset check box control inside Gallery in PowerApps.

Problem

You have a native PowerApps app or Customized Forms in SharePoint using PowerApps, and you have gallery control with checkbox control in it.

If user fills in the form for the first time and opens it again to add the next item or update the next item, the previous selections of check boxes remains as is unless you completely reload the SharePoint site.

So how to reset checkbox selection when new form is opened?

Solution

Use Reset property of Checkbox control.

Set Reset property to a Boolean variable say – ResetAllCheckboxes

 

Set this variable to true when new form is opened – Set(ResetAllCheckboxes,true)

Depending upon your requirement – you can decide on which event you want to set the value to this Boolean variable. In below example I have used reload icon >> on select of it I have set true value to ResetAllCheckboxes variable.

 
 
Done! Whenever your event gets fired – gallery check boxes will get reset.