Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reset Checkbox in nested Gallery

I do have the following scenario:

  • 1 screen with an overview of all kind of menus. The days displayed are a vertical gallery with a nested horizontal gallery to show the menus per day. The checkboxes on the screen are for a thing so called "multi-menu-order" for employees who want to order menus for the whole week.
  • 1 screen for the multi-order which shows all selected menus from the previous screen in a horizontal gallery.


Now the desired result would be: If I click on the back button I get to the previous overview and the selected checkboxes are still selected, which is the case. But if I click on the button "Order menu", the checkboxes should be resetted, which is currently not working.


Multiple Order Screen

  • Back Button
  • Order Button
            Titel: "Mehrfachbestellung",
            MenuID: {
                '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                Id: Value(Menü.ID),
                Value: Value(Menü.Title)
            Verrechnung: VerrechnungValue_1.Selected,
            'verspätetes Essen':verspätetesEssenValue_1.Value,
            'Tisch reservieren':TischreservierenValue_1.Value,
            KostenstelleLU: {
               '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                Id: Value(KostenstelleValue_1.Selected.Id),
                Value: Value(KostenstelleValue_1.Selected.Value) 
            'Art der Verrechnung': DataCardValue42_1.Selected,
            Menüdatum: MehrfachbestellungDate
    Notify(Switch(Language,"GER", "Danke für die Bestellung", "ENG", "Thank you for ordering", "FR", "Merci d'avoir passé commande"));
    found here:

Menu Overview

  • Structure
  • Checkbox Properties
    Default = false
    OnCheck =
    Collect(SelectedItems, {Menü:ThisItem,MehrfachbestellungDate:DateValue(glryDayMenüplan.Selected.lblMenüplanDateFormat.Text)})
    OnUnCheck =
    Reset = ResetCheckbox

Is it just not possible to reset checkboxes in nested galleries or is there anything missing from my side?





Accepted Solutions

Yes, this is it. It works for me. Try it to your sample app.
You may need to change the name of your variable because you have a Global and a local variable with the same name.
btn.OnSelect = Set(ResetCheckbox1,true);Set(ResetCheckbox1,false)
And Checkbox.Reset = ResetCheckbox1

View solution in original post

Helper V
Helper V

Personally I do not think this could be achieved. You have many variables to set on the checkboxes.

Not applicable

Is there really no solution to my problem?



Are you resetting your form once you clicked on "Order Menu" button?


Not applicable

Which form do you mean? The menu overview?

Hello uhlme,

I have just created a new app.

It contains two galleries and a button.

Gallery1 contains a label control and Gallery2.
Gallery2 contains a checkbox control.
CheckBox1.Reset = vReset
Button1.OnSelect = UpdateContext({vReset:true});UpdateContext({vReset:false})

I click on random checkboxes and when I press the button they reset.
So the proof of concept is there. 
Can you try it in a new simple app? Does it work for you?

Not applicable

Do you do this on the same screen or is the button on a separate screen?

Not applicable

I tried the simple app as you mentioned. It works if the button and the other controls are on the same screen, as soon as I move the button to another screen it doesn't work anymore...

Hehe. Okay, got it.
Your button is on an other screen.
UpdateContext creates a local variable. You can use it only on the same screen.
You can use the Set() function to achieve what you need.
If you need help, let me know.

Not applicable

Thanks for the help so far!

So the command would still be like this

btn.OnSelect = Set(ResetCheckbox,true);Set(ResetCheckbox,false)

And Checkbox.Reset = ResetCheckbox

I've tried that in the app and that didn't work...


Helpful resources

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,895)