Setting panel state from a specific page on 'FIRST TIME' page visit only

I’ve added a link to a button which essentially takes you to another page ‘on-click’. I would also like one particular panel from that directed page to be in a specific state upon landing, but only during the ‘first time’ visit or landing. Meaning, the next time you get directed to that page, that panel I’m referring to shouldn’t be changing its state in any way. How do I do that?

Should I set that panel state through that linked button? Or should I set that panel state directly on the directed page? Or another more efficient way to achieve it? If so, how?

I’d suggest using a global variable and onpage load events.

See attached - the “Page with First Time Logic” has a dynamic panel on it that defaults to the “First Time” state. I have a global variable of “FirstTime” defined with a default value of true.

On page load, I check if that value is “FALSE”… if it is, switch to the not first time state. Then after that check, if the global variable value is true, switch it to FALSE.

So the first time that page is loaded, you’ll see the first time state, all other times, because the value of the variable was changed to FALSE, you’ll see the 2nd state.


firstTimeLogic.rp (58.4 KB)

Thanks @UXProtoTyper! But sadly, the second time state doesn’t seem to work. When I go back and click on your ‘Go to other page’ button for the second or more time, the dynamic panel still shows ‘First time’.

Really? Works for me (Axure 8).

It’s working for me, too. When you say “go back”, do you mean in a new browser session?

Yes that’s correct. Though I tried two ways, refreshing the page to restart and clicking on the back arrow button of the browser. As otherwise there’s no way for me to repeat the action. Unless i’m doing something incorrectly?

Gotcha. I see now what you mean - I was navigating back using the left hand menu in the prototype (which does work correctly). If you were to add a link back to the prior page it should work as well.

At any rate, it looks like refreshing resets the global variable and using the back button also seems to remember the variable state - so in those scenarios my suggested solution won’t work.

What are your feelings on using some JavaScript?

I’ve added a ‘back’ button on the directed page so I can go back to previous page to repeat the action and it works! Thanks @UXProtoTyper!