Power Apps Error Fix: The Reset function can only be used with a resettable control

Two days ago, I implemented a bulk approval dashboard screen in Power Apps for the Expense Claims application. There, I was trying to reset the input controls once the bulk approval was over, but it was working fine only for the controls that were not present in the gallery control. For the control which is present within a gallery, im facing the following error:

The Reset function can only be used with a resettaable control. Controls within a Form or Gallery control can only be reset from within the same form or gallery template.
reset power apps controls within gallery

This error indicates that we cannot reset the controls present within the Power Apps gallery or form controls outside of it. Instead, we can reset within the gallery and form.

In this article, I will explain how to reset the Power Apps controls inside the Gallery or a Form from Outside.

Reset Power Apps Controls Inside a Gallery or Form from Outside

In Power Apps, to reset the controls, we use the Reset() function, which resets the control to its default value. Below is the syntax:

Reset(controlname)

Controls inside a gallery or form can’t be reset from outside. To reset a form, use ResetForm(), and to reset the controls within a gallery, one approach is to add a button inside it and use Reset().

However, in the example below, you can see that once the bulk approval is completed automatically, the selected items need to be deselected. In this scenario, we cannot follow the approach mentioned above.

Instead, we can toggle the Reset property of the controls present in the gallery from outside. So that we can easily reset the controls within the gallery, as shown below:

how to reset power apps gallery or form controls from outside

Follow the steps below to toggle the Reset property of input controls added with the Power Apps gallery control.

  1. Provide the codes below for the properties of the check box control present in the gallery.
OnCheck = Set(varReset, false);
OnUncheck = Set(varReset,true);
Reset = varReset

Here, we are creating a variable named varReset and passing the boolean values.

  • When we uncheck the check box control, this variable value becomes true.
  • And when we check it, it becomes false.
  • By assigning this Boolean variable to the Reset property of the check box control, we can easily control the resetting process.
Power Apps reset controls in a gallery or form from outside
  1. Now, add the code below to the OnSelect property of the button control.
Set(varReset,true);

When we click the button control, we assign the varReset variable to true, so the check box control will reset.

how to reset gallery or form controls from outside

That’s it; now save the changes and preview the app once. As shown in the example above, it will successfully reset the checkbox control present in the gallery. You can also use this trick for the controls present within the form control.

I hope you understand how to reset the controls within the gallery control from outside. You can follow this approach to bulk reset the controls that are present within or outside the Power Apps gallery or form controls. Also, you may like:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…