Multiple choices choice component


My app has players and groups where players belong to.

The app admin is assigning players to groups. Implemented this but trying to simplify it.

Ideally, the screen should have a choice that obtains values from groups table.

The second choice component should obtain values from players table. The admin could simply select multiple players and then this should be stored in table GroupPlayers that has columns playerID,groupID

I need to have this table instead of simply storing groupID within players table.

The admin should have option to deselect players from the choice, so the app delete playerID,groupID from GroupPlayers.

Multiple choice sets an array or list in the column - so I need to relate that column to add or remove multiple rows to PlayersGroup table.

I am new here, so not sure if this was addressed before, appologies if yes.


So is your goal to have one row in the Groups Table per group, per player?

There is no simple way at the moment to add multiple rows to a table with a single action - especially if the number of rows is not predetermined. In fact the only way is to use the Glide API.

Have you considered storing an array of player IDs in a single row along with a group ID?
This would be a lot easier to setup and manage. The Multiple Files column is ideal for this sort of use case. You can add items to the array with a Make Array column, and remove them with a Remove Array Element column.

1 Like

Do we have any tutorials recorded for this one? Admittedly I haven’t used this at all and wonder what’s the advantage of doing it? Having an array in a basic column?

I managed to did this by having a list component with “fake” check boxes, so when user clicks on the item that is not selected, a row is added to PlayersGroup table, when deselected, row is being deleted. Great UX for users.

So my screen looks like:

Header - list of all groups choice component (when user selects a group),
The list of players collection - which shows all players where user can click to select which players pertain to the selected group in header

The only issue is, the list of players is long and when I scroll down, the Header (group choice) is not visible anymore. Is there any way to I can split or fix the Header group choice, so it is always visible?

I don’t see such a component in Glide? Is this achievable?


If you put the group list in a separate container, you can fix it to the top of the screen with CSS.

Take a look at the below tutorial. It demonstrates what I was referring to with the Multiple Files column.

1 Like

Just found a time to have a look. Very elegant and efficient. Before multiple files component has been introduced, I did this with CSV column.