# How to eliminate choices after they've been selected: Many-to-many relations

**URL:** <https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140>\
**Category:** Ask for Help\
**Created:** [May 14, 2020, 2:43pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140 "2020-05-14T14:43:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![lkenyan](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@lkenyan](https://community.glideapps.com/u/lkenyan)\
**Post date:** [May 14, 2020, 2:43pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/1 "2020-05-14T14:43:19Z")

</div>

I have seen a few threads about this question. Just wondering if anyone has come up with a workaround.

Suppose I have a People sheet and a Teams sheet. And a person is joined to a team using a Memberships sheet (with a person\_id column and a team\_id column). How can I ensure that a person can only have one membership for a given team? Or, to say it another way, how can I ensure that every row in the memberships sheet is unique?

Or maybe there’s a way in the UI to show only Teams for which the current Person does not have a Membership? Like a “not” relation between People and Teams?

Any ideas or suggestions are greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [May 14, 2020, 2:49pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/2 "2020-05-14T14:49:58Z")

</div>

Hey @lkenyan

Take a look in this Glide’s video, guess can help you

[https://www.youtube.com/watch?v=0QGbNsAPhLw](https://www.youtube.com/watch?v=0QGbNsAPhLw)

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 14, 2020, 2:59pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/3 "2020-05-14T14:59:26Z")

</div>

How are people being assigned to teams? Form button?

---

<div class="post-metadata">

**Author:** ![lkenyan](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@lkenyan](https://community.glideapps.com/u/lkenyan)\
**Post date:** [May 14, 2020, 3:05pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/4 "2020-05-14T15:05:24Z")

</div>

Yes. That’s what I’m currently doing. The form is creating a Membership row with a Person ID and a Team ID. But I can’t seem to find a way to show only Team choices for which the current Person does not have a Membership.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 14, 2020, 3:17pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/5 "2020-05-14T15:17:48Z")

</div>

Can a person join more than one team? If not, is that what you’re trying to prevent?

---

<div class="post-metadata">

**Author:** ![lkenyan](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@lkenyan](https://community.glideapps.com/u/lkenyan)\
**Post date:** [May 14, 2020, 3:20pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/6 "2020-05-14T15:20:00Z")

</div>

Yes. A person can join multiple teams, but should only be joined to a given team once. So, trying to prevent joining a given person to a given team multiple times.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 14, 2020, 3:27pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/7 "2020-05-14T15:27:34Z")

</div>

Last question: is a person signing themselves up for a team? If so, this might be achievable…if an admin is assigning the person to the team, then this will be much trickier.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 14, 2020, 3:38pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/8 "2020-05-14T15:38:24Z")

</div>

Did it!..I’ll create a video shortly.

This will also solve this issue:

> [@List of choice with item already taken](https://community.glideapps.com/t/list-of-choice-with-item-already-taken/7697):
>
> Hello Guyz, slight_smile As you can see i have choice list with color (color are from another tab), and i can join my league (ligue Bibi). In the ligue i chose (ligue Bibi) Blue is already taken, then i would like to withdraw it from the color list. Do you have any idea? grinning

@Lucas_Pires @Jeff_Hager

Stay tuned!

---

<div class="post-metadata">

**Author:** ![lkenyan](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@lkenyan](https://community.glideapps.com/u/lkenyan)\
**Post date:** [May 14, 2020, 3:39pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/9 "2020-05-14T15:39:57Z")

</div>

In my case, an Admin is assigning people to teams.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 14, 2020, 3:40pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/10 "2020-05-14T15:40:58Z")

</div>

😕 Okay…I’ll test. I’ll show you what I have so far and it may spark inspiration.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 14, 2020, 3:54pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/11 "2020-05-14T15:54:03Z")

</div>

How many admins are assigning users to teams?

---

<div class="post-metadata">

**Author:** ![lkenyan](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@lkenyan](https://community.glideapps.com/u/lkenyan)\
**Post date:** [May 14, 2020, 4:01pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/12 "2020-05-14T16:01:06Z")

</div>

In the current design, there is no limitation to how many users might be given the Admin role.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 14, 2020, 4:21pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/13 "2020-05-14T16:21:02Z")

</div>

Ok…I might have a workaround…but it’s a bit more involved with my current method. Video is almost ready.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 14, 2020, 4:48pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/14 "2020-05-14T16:48:02Z")

</div>

# PART 1: USERS ASSIGNING THEMSELVES

Here’s the video on how a user can sign themselves up for unique teams:

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/9/9d68e44d46528f2198cbd4a2fb93c7db933bdc82.jpeg "Glide: Choice Eliminator") ](https://www.youtube.com/watch?v=6ucd1PkHDbE)

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 14, 2020, 4:48pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/15 "2020-05-14T16:48:15Z")

</div>

# PART 2: ADMINS ASSIGNING USERS

This one features an admin assigning users to teams without repeats:

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/2/287329125422217811a627e9d93dfeaf0b7759ac.jpeg "Glide: Choice Eliminator Part 2") ](https://www.youtube.com/watch?v=4yfiSGg9O8I)

@lkenyan @Lucas_Pires @Jeff_Hager

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [May 14, 2020, 6:38pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/16 "2020-05-14T18:38:57Z")

</div>

Neat! Perfect done @Robert_Petitto 👏

---

<div class="post-metadata">

**Author:** ![lkenyan](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@lkenyan](https://community.glideapps.com/u/lkenyan)\
**Post date:** [May 14, 2020, 8:07pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/17 "2020-05-14T20:07:56Z")

</div>

Clever! Thank you so much!

Question: can you describe some alternative ways of writing the “selected user” to the column in the Admin sheet? Asking because in my early experimentation with using Glide for a couple of apps, I’m encountering this pattern several times. Wondering about maybe additional/alternative UI pattens that would achieve the same end-result.

---

<div class="post-metadata">

**Author:** ![Carlos\_DeSilva](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carlos_desilva/32/19965_2.png) [@Carlos\_DeSilva](https://community.glideapps.com/u/Carlos_DeSilva)\
**Post date:** [May 14, 2020, 11:05pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/18 "2020-05-14T23:05:00Z")

</div>

Can someone in Glide give this man, @Robert_Petitto, a job please? 🤔

---

<div class="post-metadata">

**Author:** ![spencersRus](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/spencersrus/32/69_2.png) [@spencersRus](https://community.glideapps.com/u/spencersRus)\
**Post date:** [May 14, 2020, 11:06pm UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/19 "2020-05-14T23:06:52Z")

</div>

@Robert_Petitto - thanks for all these videos

I’m your #1 fan (I even watched the ipad return procedures video!)

Kevin in VA

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 15, 2020, 1:50am UTC](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140/20 "2020-05-15T01:50:38Z")

</div>

HAHA! That’s awesome. Ya…if I were to do this all over again, I’d probably want to separate my school account from my Glide account…bit late for that at the moment though…I’ll cross that bridge if it comes down to it.

If anything it gives people a “full picture” of my day-to-day lol

[Next page](https://community.glideapps.com/t/how-to-eliminate-choices-after-theyve-been-selected-many-to-many-relations/9140.md?page=2)
