Upvote 1

Dynamic panels back button

Solved Thomas Barton 5 years ago

I have an issue where I am using dynamic panels but need to go to the previous panel when the user presses the back button. Since there are multiple ways in which a user can arrive at the active panel in question, I can't just statically take them back to a particular panel when they press the back button - I need to take them back to the previous panel they were on. Dynamic panels are very powerful, but without a "go to previous panel" option they are quite useless to me. Any ideas on how this functionality can be accomplished? Thanks in advance!

Replies (1)
photo
1

While there's no default 'back' dynamic panel button functionality, we can create a workaround using variables and 'on panel active' events.

On each panel, we create an "On Panel Active" + "Set Value" event, setting the value of a variable to 1, 2, or 3 (depending on which panel it is. For example, Panel 1 would set the variable to 1, Panel 2 would set the variable to 2, and so on). We'll use this to detect which panel you were last on before you click to Panel 4 (the panel with the 'back' button).

Then, for the 'back' button on Panel 4 we've created "On Click" + "Set Active Panel" events that set each panel as active. So, if we have 3 panels, we have 3 "On Click " + "Set Active Panel" events. Then, we've created a condition for each that is When... Variable = 1 (or 2 or 3 to correspond with the panel we've set as active for that event).

See the attached prototype for an example, and let me know if you have any questions.

photo
1

Danielle - thank you very much. This is great. I had not thought to use variables and conditions to achieve this functionality. You have greatly expanded my proficiency with JIM and I appreciate it very much!

photo
1

Glad to help!

photo
Leave a Comment
 
Attach a file