cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
maxandriola
Frequent Visitor

Reset a checkbox to blank OnVisible

Hi all,

 

I am currently trying to reset multiple checkboxes to blank after loading a current page.

My current method is adding an UpdateContext({ClearCheckbox: true}) on the OnVisible, then adding ClearCheckbox on to the checkbox "Reset"

 

Anyone have some ideas they could share?

Thanks.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @maxandriola ,

Do you want to reset multiple Checkboxes when you navigate to the target screen (which contains the multiple Checkboxes)?

 

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

Set the OnVisible property of the target screen to following:

UpdateContext({ClearCheckbox: false});
UpdateContext({ClearCheckbox: true})

Set the Reset property of each Checkbox control within your Target screen to following:

ClearCheckbox

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
SimonPiquer
Responsive Resident
Responsive Resident

Hi,

 

What is the Default property of your checkbox set to? If you have the Default set to 'false' you can simply put this in the OnVisible property of your screen:

 

Reset(Checkbox1)

Would that work?

 

PaulD1
Super User
Super User

Try

UpdateContext({ClearCheckbox: false}) 
UpdateContext({ClearCheckbox: true}) 

You have to actually change the value of the variable to trigger the reset IIRC.

v-xida-msft
Community Support
Community Support

Hi @maxandriola ,

Do you want to reset multiple Checkboxes when you navigate to the target screen (which contains the multiple Checkboxes)?

 

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

Set the OnVisible property of the target screen to following:

UpdateContext({ClearCheckbox: false});
UpdateContext({ClearCheckbox: true})

Set the Reset property of each Checkbox control within your Target screen to following:

ClearCheckbox

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

This worked!

Was not aware that I needed to set the variable for both true and false. 

Thank you for the solution. 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (6,620)