Dynamically determine how many states in a dynamic panel?


#1

I’m looking for a way to dynamically determine how many states are in a given dynamic panel. For instance, to go to the first state, I can always “Change State to #1” but how to guarantee a change to the last state? How to know if a state is changed that it is the last possible state? …Something similar to a conditional test of the [[Item.isLast]] in a repeater.

The real-world need for this is multiple authors of a Team Project, with some not willing to get into the interaction code, but who might need to delete and/or duplicate states, or change their order. I’d like the interaction code to be bullet-proof regardless of how many states exist in a dynamic panel.


#2

If you aren’t using looping for something else, make it loop, go to state 1 then go to previous state?