Global Variables set wrong value

Hello guys,

I would like to ask you for help.
For a form I’ve got some question and the answers are yes or no.
For this I created the “yes” and “no” buttons. Every button has got 2 dynamic panel states - click and unclick. I have to use a default state “unclick”, because I’m trying to get the users to click a button. When they choose 2 “yes”, another page will open.
I would like to carry these values to the other page, because I would like to set the button states. For this I try to use Global Variables, but the values are not correct when open the another page and I can’t figure out why.
GlobalVariables.rp (111.1 KB)

This is the .rp, but there aren’t the buttons on the other page, just some checker to the Global Variable values.
Where are the mistakes?

Or are there any other, more simplest way to do these things?

Thank you in advance for your help.

Here there…

If you wanted to simplify maintenance a bit, you could use the selected styling of the widgets to avoid having dynamic panels.

As to why your global variables aren’t persisting, try changing the order of your actions a little bit. If I move your “Set state” action to the last thing on click, it works. I think what happens is that the onPanelStateChange event fires too quickly for the global variable changes to “stick”.

image