Reset a Button to Original Label after a specified number of clicks

Hi! I have a button in an action screen where every time it is clicked, the label changes. It corresponds to a point on a graph that goes around the circle. After my point goes around the circle, I want the button to reset to the original label and then repeat. Any ideas?

So basically you want it to rotate like 1,2,3,1,2,3 or something?

You can use the numericValue function along with the calculator’s mod feature to get cyclic values.

cyclicValue = numericValue("\\mod(${button.pressCount}, 4)")

# Do something with 'cyclicValue' to come up with label text

Here’s an example.

Yes - this is exactly what I was trying to figure out. Thank you so much!