How to change state of page 2 from page 1

Hi can tell me how to do this.

On page 1 I have a hot spot which has a link to page 2.

Page 2 has a dynamic panel with:

State 1 oranges
State 2 apples
State 3: grapes

So when the user clicks on the hotspot on page 1, I want them to land on page 2 but show ‘state 2 apples’ or have the function to show any state but needs to be defined by me.

how do I that?


Global variable.

If you want to be really smart about it just put an action OnPageLoad that says 'Set state of (dynamic panel) equal to [[aVariable]] then make sure that when you set your variable on any other page it is the same as the name of one of your panel states.

I have the same case. But following your instruction is not enough. I got lost on “equal to [[aVariable]]” Can you provide a .rp file?

What’s next? :frowning:

Panels.rp (63.9 KB)

I used Buttons instead of Hotspots but it’s the same procedure:

  1. Button: OnClick => set value of the variable then change page
  2. Dynamic panel: OnLoad => set panel state of this to value = variable

Hope it will help you,