Forum Discussion
Toggle Variables
Hi All, I have an interaction I want some help with...
I want to change a variable Q4_3_PS4a_V, whose default state is False, to True, when a user clicks on hotspot PS4a V.
If the variable has been changed to True, I want the state to return to False, if the user clicks the hotspot again.
I added the triggers as shown below. The default state of False changes to True as expected. However, it stubbornly remains True, it does not go to False as I would like.
If I change the order of the triggers, the state does not change at all.
What am I missing here? Any help is appreciated...
- MariaCSStaff
Hi, William.
Have you considered using the toggle variable trigger, instead?
That way only one trigger is required, without conditions.
Let me know if this works!
- WaltHamiltonSuper Hero
Maria's suggestion is the only way to do what you want, because every time you click it executes both triggers. So, if the variable is true, the first trigger changes it to false. Then whether it started true or false, the second trigger changes it to true.
- WilliamRyan-dbaCommunity Member
Well I'm feeling like a genius right about now... 🙄. I lost hours with this, and I don't know how many times I opened the trigger interface.
Thanks both, for your help.