Infinite Toggle

Jun 06, 2019

Done a lot of looking and there's much out there about toggles of various kinds, but I've found nothing that quite meets my criteria... I simply want to be able to click a hotspot and toggle two sets of numbers, from one to the other- indefinitely. I've attached a snip of the graphic setup- If the user clicks on the hotspot over the switch, the numbers in the window change from '310' to '420'. A subsequent click on the hotspot returns the number to '310' and back to 420 if clicked again. I can set it up so that it works once from 310 to 420, but can't figure out how to toggle it back to 310 and repeat. I know that I'll have some users who will try to toggle multiple times, so I don't want any limitations on the number of clicks. Ideas?

5 Replies
Walt Hamilton


The variable is a necessity because it serves as an independent "3rd party" to the action. Otherwise, your triggers are something like"Change state of text box  to B if it is A", followed by "Change state of text box to A if it is B".  You can see how that would always end up with the text box in a state of A.

The "NOT assignment" only works for variables that can have only two options, and at present for SL, that means True/False. Think of it as meaning "Change it to the value which it is not. That gives you the ability to change it without having to know or reference what it currently is.

Just change it (whatever its current value),to the other value, and then depending on its new value, change the state of the text box.