cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
farhandsome
Level: Powered On

PowerApps Gallery ForAll Question

Hi all,

 

I had a question about gallery usage with the ForAll feature. I have an auto-created gallery that is populated by a different record. I associated this new gallery with a checkbox for each item. I want all the checkboxes to uncheck if the user clicks the "close" button. That way if the gallery is reopened, all the checkboxes are fresh. This is a little hard to describe, so attached below is a picture of what I mean:

 

PowerApps Checkbox Error.PNG

 

As you can see, I am trying to use the "ForAll" feature with the gallery on the OnSelect feature of the "close" button in order to reset the values of the checkboxes to false. However, this does nothing to the values and I am not getting an error returned from the code. Does anybody have any ideas on how I can achieve this?

 

Thanks,

Farhan

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: PowerApps Gallery ForAll Question

Hi @farhandsome ,

Could you please share a bit more about your scenario?

Do you want to reset the Checkboxes within your Gallery when you press the "Close" button?

 

Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:

Set the OnSelect property of the "Close" button to following:

UpdateContext({PkgQty: false});
Set(IsReset, false);Set(IsReset, true)

set the Reset property of the Checkbox within the Gallery to following:

IsReset

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Digital
Level 8

Re: PowerApps Gallery ForAll Question

You could try using a context variable in the Reset property of the checkbox e.g. varReset

 

Then on the Save button update the variable. This will trigger the default for the checkbox e.g. false or blank.

 

UpdateContext({varReset: true});
UpdateContext({varReset: false}),

Community Support Team
Community Support Team

Re: PowerApps Gallery ForAll Question

Hi @farhandsome ,

Could you please share a bit more about your scenario?

Do you want to reset the Checkboxes within your Gallery when you press the "Close" button?

 

Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:

Set the OnSelect property of the "Close" button to following:

UpdateContext({PkgQty: false});
Set(IsReset, false);Set(IsReset, true)

set the Reset property of the Checkbox within the Gallery to following:

IsReset

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

farhandsome
Level: Powered On

Re: PowerApps Gallery ForAll Question

Fantastic, this worked like a charm. I think I realize my mistake in using For All. Yes you are correct in your thinking: I want to reset the boxes when I push the close button. 

 

This is just the first step for this project, I'm sure I will have many more questions as issues arise! But thank you for this.

farhandsome
Level: Powered On

Re: PowerApps Gallery ForAll Question

Another question - is it possible to set the displaymode based on if atleast one of the checkboxes is selected? I'd like to add a "start" button as well, but I want it to be disabled until the user selects atleast one of the checkboxes.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,899)