# Multiple choices choice component

**URL:** https://community.glideapps.com/t/multiple-choices-choice-component/72360
**Category:** Ask for Help
**Created:** [April 7, 2024, 8:23am UTC](https://community.glideapps.com/t/multiple-choices-choice-component/72360 "2024-04-07T08:23:31Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Darko\_Vukoje](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darko_vukoje/32/73227_2.png) [@Darko\_Vukoje](https://community.glideapps.com/u/Darko_Vukoje)
#### Post date: [April 7, 2024, 8:23am UTC](https://community.glideapps.com/t/multiple-choices-choice-component/72360/1 "2024-04-07T08:23:31Z")

</div>

Hi,

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.

Thanks

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 7, 2024, 8:47am UTC](https://community.glideapps.com/t/multiple-choices-choice-component/72360/2 "2024-04-07T08:47:31Z")

</div>

> [@Darko\_Vukoje](#):
>
> 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

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.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [April 7, 2024, 11:27pm UTC](https://community.glideapps.com/t/multiple-choices-choice-component/72360/3 "2024-04-07T23:27:55Z")

</div>

> [@Darren\_Murphy](#):
>
> The Multiple Files column is ideal for this sort of use case.

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?

---

<div class="post-metadata">

### Author: ![Darko\_Vukoje](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darko_vukoje/32/73227_2.png) [@Darko\_Vukoje](https://community.glideapps.com/u/Darko_Vukoje)
#### Post date: [April 9, 2024, 8:05am UTC](https://community.glideapps.com/t/multiple-choices-choice-component/72360/4 "2024-04-09T08:05:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Darko\_Vukoje](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darko_vukoje/32/73227_2.png) [@Darko\_Vukoje](https://community.glideapps.com/u/Darko_Vukoje)
#### Post date: [April 9, 2024, 8:10am UTC](https://community.glideapps.com/t/multiple-choices-choice-component/72360/5 "2024-04-09T08:10:03Z")

</div>

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?

Thanks

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 9, 2024, 8:13am UTC](https://community.glideapps.com/t/multiple-choices-choice-component/72360/6 "2024-04-09T08:13:53Z")

</div>

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

> [@Container level scrolling](https://community.glideapps.com/t/container-level-scrolling/72100/5):
>
> Sure! Thanks for the ping @Darren_Murphy Give your container a classname stickytop and paste this into custom CSS: .stickytop { position: -webkit-sticky; position: sticky; top: 0px; z-index: 999; margin-top: 0px; }

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 9, 2024, 8:15am UTC](https://community.glideapps.com/t/multiple-choices-choice-component/72360/7 "2024-04-09T08:15:35Z")

</div>

> [@Darko\_Vukoje](#):
>
> 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.

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

> [@dizzy A NEW way to Trebuchet!](https://community.glideapps.com/t/a-new-way-to-trebuchet/72402):
>
> wave Hey fellow Gliders! If you haven’t heard of the Trebuchet method, it’s a term coined by @Lucas_Pires that refers to creating inline arrays. Inline arrays can be an efficient way to create relations without requiring a helper table thereby preserving your row count! Previously, the Trebuchet method required about 6 columns and 2 custom actions (4 updates to add and remove a single item). This new version of the Trebuchet method cuts that usage IN HALF star_struck (3 columns, 1 action). …

---

<div class="post-metadata">

### Author: ![Darko\_Vukoje](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darko_vukoje/32/73227_2.png) [@Darko\_Vukoje](https://community.glideapps.com/u/Darko_Vukoje)
#### Post date: [April 15, 2024, 3:01pm UTC](https://community.glideapps.com/t/multiple-choices-choice-component/72360/8 "2024-04-15T15:01:26Z")

</div>

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.
