cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Issue with controls reset

I face the same problem noted in here https://powerusers.microsoft.com/t5/PowerApps-Forum/Reset-all-value-controls-in-a-multi-page-survey-...

 

I created a 5 page survey and at the end I want to save the info and reset all the controls in all pages to default state. There's a button at the end of the survey that goes back to page 1 and I've tried everything I could imagine to solve the reset issue.

 

I've tried setting the Reset Property on all controls to "Final_Button.Pressed" (without quotes) and also tried this:

 

    Collect(Signal, 0); Clear(Signal)

 

Bind the Reset properties of the relevant text input controls, etc, to:

   TextInput1.Reset = IsEmpty(Signal)

 

Funny thing is. Both methods work perfectly with the desktop editor but both fail when deployed to mobile (both tablet and smartphone). Is this a known issue? Any workaround available?

 

Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
erga
Power Apps
Power Apps

Hi @Anonymous

 

Thank you for reporting this issue! The controls resest issue is known to us in the PowerApps team and will be fixed within our next few releases. The current workaround is to pass down a context variable using the Navigate(...) function from the previous screen, and then use that variable to Collect and Clear. 

 

For example: Suppose you want to nagivate from Screen1 to Screen2 via Button1. Set Button1's "OnSelect" property to "Navigate(Screen2,Fade,{fromScreen1:true})". Then, on Screen2, set its "OnVisible" property to "If(fromScreen1, Collect(signal,{val:0});Clear(signal))". Repeat for your other screens. 

 

Let us know if you have any further issues!

 

Eric, Software Engineer, PowerApps Staff

View solution in original post

14 REPLIES 14
erga
Power Apps
Power Apps

Hi @Anonymous

 

Thank you for reporting this issue! The controls resest issue is known to us in the PowerApps team and will be fixed within our next few releases. The current workaround is to pass down a context variable using the Navigate(...) function from the previous screen, and then use that variable to Collect and Clear. 

 

For example: Suppose you want to nagivate from Screen1 to Screen2 via Button1. Set Button1's "OnSelect" property to "Navigate(Screen2,Fade,{fromScreen1:true})". Then, on Screen2, set its "OnVisible" property to "If(fromScreen1, Collect(signal,{val:0});Clear(signal))". Repeat for your other screens. 

 

Let us know if you have any further issues!

 

Eric, Software Engineer, PowerApps Staff

View solution in original post

Anonymous
Not applicable

Hi @erga

 

Your tip worked perfectly with Rating control (the one with 5 stars) and it was reset to 3 as expected but the Radio (Button) lists on other screens didn't work.

 

I set IsEmpty(signal) to the Reset property on all controls and Default is set to "" on Radios. Should do something different?

 

Cheers,

tim

The workaround will kick in only when you navigate to that screen. Is the radio button on a different screen than the rating control? If so, you need to include the same logic in the navigation to those screens as well.

 

Hope this helps

 

Murali

Anonymous
Not applicable

Hi @murali

 

Yes, I did it like before, one workaround for each page (and yes, there's one Radio on each page). I used different variables (fromScreen2, fromScreen3, etc.) but apparently Radios are not resetting.

 

Cheers,

tim

To clarify, you are seeing the Rating control reset but not seeing the Radio control reset on the same screen?

 

In addition to checking that the Reset property of all controls is set to "IsEmpty(signal)", please also verify that each screen's "OnVisible" property is appropriately set to "If([fromScreen#], Collect(signal,{val:0});Clear(signal))", where [fromScreen#] is the variable passed down from the previous screen. 

 

If after all these steps your issue persists, please provide us a Session ID and we can investigate on our end.  

 

Thanks,

Eric, Software Engineer, PowerApps Staff

Has this problem been fixed?  My thinking is that a control's value should reset by DEFAULT.  I'm not sure I understand the logic.

hpkeong
Community Champion
Community Champion

Hi @erga @Anonymous

 

From my experiene and also some ideas from PA Staff, one way is
- Radio.Reset = var1

- Rating.Reset = var1

- xx.Reset = var1 (xx means any other properties you wish to reset)

 

So when a button is clicked and navigate back to that specific screen, try to have

- Screen.OnVisioble = UpdateContext({var1: false}); UpdateContext({var1: true})

 

That should work.

Can you try please?

 

TQ

 

 

hpkeong
Anonymous
Not applicable

@hpkeongyour code did not work. I have the exact same problem as the orignal poster.

Anonymous
Not applicable

Hi @hpkeong, it didn't work... 😞

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,973)