Only one cell can be selected at a time in a repeating group

So I have a repeating group that shows a list of athletes. The goal of this repeating group is to simply have ONLY 1 athlete selected at a time.

When the user loads the page, no groups in the RG are selected.
Once a user clicks on a single group, the single group turns green.
Once that single group is green, no other group can be clicked, until the 1 green group is deselected.

I am struggling. Please help, thank you!

There are a few different ways to achieve what you want. Right now -
what have you programmed to happen when the user clicks the cell? How does it know to turn green?

The simplest way is just to have a custom state somewhere, of the same type as the RG content.

Have a conditional on the group so that when the custom state’s value is the current cell’s Thing, it should be green.

Then just run a workflow to set the custom state to the current cell’s Thing whenever the group in the RG is clicked.

1 - Create a state in your page called selected_athlete (object type = athlete)

2 - Create a workflow when you click on your athlete group : set the state (selected_athlete) to the one you had selected with the following condition → only when selected_athlete is empty.

3- Create a workflow when you click on your athlete group : set the state (selected_athlete) = empty with the following condition → parent group athlete is selected_athlete

4- For your athlete group in your repeated group, select the tab “conditionnal” and change the appearance of your group following the condition → when this group is selected_athlete

I’m still not following unfortunately. When I complete these steps all of my groups are green and I cannot click them back to the original color.

The object type that feeds data to the text elements is a DB with many columns.

Is there a way to set this up with yes/no state types?

I am more than willing to share project access if you feel so inclined :slight_smile:

You’ve obviously done something wrong there then… (without knowing what you’re doing i can’t say what…)

Is there a way to set this up with yes/no state types?

Possibly, but it would be a lot more complicated than the method outlined above…

Feel free to share some screenshots of what you’ve done, or a link to your editor, so someone can see where you’re going wrong…

This topic was automatically closed after 70 days. New replies are no longer allowed.