Set certain state as starting state of dynamic panel


I have a dynamic panel with 9 states.

It’s supposed to represent an application where you start at a screen displaying the time (state 1). If you press the swipe down arrow you go to state 2, press again and you go to state 3 and then to state 4.

The same is true for pressing the swipe up button. Press once and you go to state 5, again for state 6 and so on till state 9.

I have placed the states in the order 9, 8, 7, 6, 5, 1, 2, 3, 4 so they are in the correct order for swiping up and down, but the preview always starts at state 9 instead of state 1. I cannot figure out how I can make state 1 the starting state.

A have attached the RP file to make it more clear.


Swiping up and down.rp (358 KB)

Hi Michael!

A couple Events that can help are “OnLoad” and “OnPageLoad”. On the dynamic panel, for instance, you could create a Set Panel State action under its OnLoad event, like this:

The OnLoad event is triggered when the containing widget is initially loaded on the page. Similarly, the OnPageLoad event (of the Page Inspector pane) is triggered when the page loads in the browser. Here’s an edited version of your project for reference:

OnLoad.rp (360 KB)

Hope this helps!

Hi Alex,

Thank you very much! This will help I believe!

You can also change the order of the states in the ‘Outline’ to the left. If a state is moved to the top, it becomes the starting state.