Set Button Click State in repeating group


How do I set the background color state of a button in a repeating group? When a user clicks on one button, it is the color red. When the user clicks another button, it is red, but the first button is the original color. How can this be achieved?


One possible solution would be:

Define a state in your repeating group as a number, let’s call it ButtonClicked.

When you click Button 1, use action set state of ButtonClicked = 1.
When you click Button 2, use action set state of ButtonClicked = 2.

Then you can do the conditional formatting for the buttons. If ButtonClicked = 1, background color = …


The Buttons are in a repeating group - with dynamic name showing. How do I set them as 1, 2, 3, etc.?


Found my answer: