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
Power Apps Staff erga
Power Apps Staff

Re: Issue with controls reset

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
Power Apps Staff erga
Power Apps Staff

Re: Issue with controls reset

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

Highlighted
Anonymous
Not applicable

Re: Issue with controls reset

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

Power Apps Staff murali
Power Apps Staff

Re: Issue with controls reset

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

Re: Issue with controls reset

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

Power Apps Staff erga
Power Apps Staff

Re: Issue with controls reset

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

ColinI
Level: Powered On

Re: Issue with controls reset

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
Level 10

Re: Issue with controls reset

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

Re: Issue with controls reset

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

Anonymous
Not applicable

Re: Issue with controls reset

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

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,871)