# Troubleshooting Many-to-Many Player-Team Relationships in sport club app

**URL:** https://community.glideapps.com/t/troubleshooting-many-to-many-player-team-relationships-in-sport-club-app/81202
**Category:** Ask for Help
**Created:** [April 6, 2025, 5:40am UTC](https://community.glideapps.com/t/troubleshooting-many-to-many-player-team-relationships-in-sport-club-app/81202 "2025-04-06T05:40:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Rob\_Cap](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rob_cap/32/87029_2.png) [@Rob\_Cap](https://community.glideapps.com/u/Rob_Cap)
#### Post date: [April 6, 2025, 5:40am UTC](https://community.glideapps.com/t/troubleshooting-many-to-many-player-team-relationships-in-sport-club-app/81202/1 "2025-04-06T05:40:06Z")

</div>

Hello,  
I am building an app to manage a volleyball club.

The club has various team (for the sake of simplicity let’s say 2: TeamA and TeamB).

Each player can belong to one or multiple teams.

For example Jack belongs to TeamA only; Jill belongs to TeamA AND TeamB

I’ve got 3 tables:

1. Players\_Teams Table: A junction table connecting players to teams

[Team | Rel\_Player  
TeamA | Jack  
TeamA | Jill  
TeamB | Jill]

1. Players Table: Contains player information, with a “Rel\_Teams" column showing teams they belong to  
(relation: Relate to items where the value in: Name Matches the value in:Players\_Team–\>Players\_Name [match multiple])

[Name | Photo | Position | Rel\_Team  
Jack | photo | OH | TeamA  
Jill | photo | S | TeamA TeamB]

1. Teams Table: Contains team information (Team\_Name) and Rel\_Player with related players

Expected:  
[Team\_Name | Rel\_player  
TeamA | Jack Jill  
TeamB | Jill]

Observed:  
[Team\_Name | Rel\_player  
TeamA | Jack  
TeamB | ]

The values are correct in the Players Table and Players\_Teams Table.  
However, in the Teams Table Jill (who belongs to both TeamA and TeamB) does not appear.

My hypothesis is that it has to do with the data structure and the many to many relation, but I cannot figure out what’s wrong and how to fix it.

Any help is much appreciated.  
Cheers

---

<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 6, 2025, 5:42am UTC](https://community.glideapps.com/t/troubleshooting-many-to-many-player-team-relationships-in-sport-club-app/81202/2 "2025-04-06T05:42:05Z")

</div>

Can you show how the relation in your Teams table is configured?

---

<div class="post-metadata">

### Author: ![Rob\_Cap](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rob_cap/32/87029_2.png) [@Rob\_Cap](https://community.glideapps.com/u/Rob_Cap)
#### Post date: [April 6, 2025, 5:57am UTC](https://community.glideapps.com/t/troubleshooting-many-to-many-player-team-relationships-in-sport-club-app/81202/3 "2025-04-06T05:57:27Z")

</div>

Oh dear …  
I was pointing to the wrong column.  
So sorry to bother. I promise I’ve been trying for a couple of days #blush

Anyway this is how it works (now).  
Name: Rel\_Players  
Type: Relation  
Relate to items where the value in: Team\_Name  
Matches the value in: Players–\>Lookup\_teams [match multiple]

Where in the Players Table  
Name: Lookup\_team  
Type: Lookup  
Relation column: Rel\_Team–\> Team

And Rel\_Team is  
Name: Rel\_Team  
Type: Relation  
Relate to items where the value in: Name  
Matches the value in: Players\_Teams–\>Player\_Name [match multiple]

I did that because I could not reference the Rel\_Team column directly.

---

<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 6, 2025, 6:31am UTC](https://community.glideapps.com/t/troubleshooting-many-to-many-player-team-relationships-in-sport-club-app/81202/4 "2025-04-06T06:31:23Z")

</div>

So it’s working okay now?

Just one additional comment I would make… instead of matching on names, it’s generally a better practice to add RowIDs to your tables and use those in relations. This is because RowID values will never change, but names could change (which will potentially break things if they are used in relations).
