Reload page & reset all variables/repeaters

advanced-prototyping

#1

Axperts,

Is there any way to reload the current page and reset all Global Variables and Repeater data?

My prototype is all included in one page, using Masters and Dynamic Panels, along with many variables. I’d like to be able to reload the whole prototype and reset all variables.

I see how I can go to previous page and reset variables. Not sure how to do it using current page.


#2

You need to use the open reload in current window option. I have done for Global Variables. Please check the attached RP file.

Thanks,
Vikram
Reload page.rp (59.9 KB)


#3

Thanks! I’m looking for the opposite case where I can reload a single page and not carry over any changes to variables. Basically, reset all Global Variables to their default values.


#4

Hi rpjcfux,

If you want to reset your global variables (without having to manually refresh the browser page), you can use the page’s “OnPageLoad” interaction to change the variables back to their default values. The OnPageLoad interaction fires every time the page is loaded, so doing this will ensure that the global variables will be set to their default values–or whichever values you specify–whenever the page is loaded or reloaded.

For example, if you have three global variables named “Variable1”, “Variable2”, and “Variable3” with default values of “default1”, “default2”, and “default3” respectively, this OnPageLoad interaction will reset their values:


Hopefully this helps!


#5

Hi Simon,

True. I could do it this way. Not sure why I didn’t think of that. Being that I have 20+ global variables, it’d sure be nice to have a “Reload Page and Reset All Variables” or even an action that just resets them all. There’s a variety of reasons to reset them.

Thanks! I’ll use this method for now.


#6

Hi rpjcfux,

I can definitely see how having a specific action that reloads the page and resets all global variables could be useful to have. I’ll go ahead and file this as a feature request to our product management team.

Let me know if you have any questions!


#7

Has there been any progress on this? This seems to be a common need.


#8

I don’t believe so, but I’ll go ahead and let our team know that there’s still interest in resetting variables through a reload action. Thanks!


#9

You can do this by using the “Link to an external url or file” option. Just enter the name of the current page and append “.html” to it.

For example, the page you want to reload and reset all variables is named Home. Just enter “home.html” into the Hyperlink field. This makes the browser reload the page as if you had clicked the page refresh button.


#10

+1 for the reset all global variables to default values.