Completely reset app without page refresh

There are a few cases where we'd like to completely "reset" an app to its original state (i.e. clear form fields, reset queries, etc.). We know we can do this with a full page refresh but that's not really ideally.
Is there a function we can call that will do this?
I noticed today that if you switch environments while previewing your app it effectively does a reset like I want. Really hoping there's a way we can trigger similar behavior via code.
Thanks!

1 Like

Hi @tarh33l! Unfortunately, there doesn't seem to be anything like page.reset() available in Retool, but you can call the .reset() function on a variety of components!

You can call form1.reset() for example from

  1. a JS query
  2. an event handler
  3. a JS script in an event handler
  1. a JS query

2. an event handler

3. a JS script in an event handler

Let me know if any of these options would work for you!