# Preventing Repetition on many to many relationship

**URL:** <https://community.glideapps.com/t/preventing-repetition-on-many-to-many-relationship/42222>\
**Category:** Ask for Help\
**Created:** [May 21, 2022, 2:04am UTC](https://community.glideapps.com/t/preventing-repetition-on-many-to-many-relationship/42222 "2022-05-21T02:04:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hani\_Ibrahim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hani_ibrahim/32/42108_2.png) [@Hani\_Ibrahim](https://community.glideapps.com/u/Hani_Ibrahim)\
**Post date:** [May 21, 2022, 2:04am UTC](https://community.glideapps.com/t/preventing-repetition-on-many-to-many-relationship/42222/1 "2022-05-21T02:04:34Z")

</div>

hello everyone,

i have the follows:

- Contractor table which accommodate:

1. contractor name
2. photo.  
it is always growing table

- Project table which accommodate:

1. project name
2. photo.  
it is always growing table too

- A table to act as container for many to many relationship named Contractor’s Project to accommodate:

1. project name
2. contractor name

i want to prevent adding the same contractor from contractor table to the same project twice.

i am using a selection component at the Contractor’s Project table to select the contractor from Contractor table.

The main issue i am facing is how to link the Contractor table with Project table  
Kindly, assist me in How could i do that?

Thank you

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 21, 2022, 2:38am UTC](https://community.glideapps.com/t/preventing-repetition-on-many-to-many-relationship/42222/2 "2022-05-21T02:38:51Z")

</div>

What if you instead added a contractor column to the project table, then added a multi-select choice component to select all of the contractors. This will give you a comma delimited list of contractors for each project in that new contractors column. Then you can use a Split Text column to split that list of contractors into an array. Now you can use that column to creat a relation from the contractor table to the project table and vice versa. That way you can eliminate the third container table all together and you won’t have to worry about duplicates.

---

<div class="post-metadata">

**Author:** ![Hani\_Ibrahim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hani_ibrahim/32/42108_2.png) [@Hani\_Ibrahim](https://community.glideapps.com/u/Hani_Ibrahim)\
**Post date:** [May 21, 2022, 2:43am UTC](https://community.glideapps.com/t/preventing-repetition-on-many-to-many-relationship/42222/3 "2022-05-21T02:43:41Z")

</div>

Thank you so much for your idea and prompt feedback, as you usually does.

Your respected idea is really valid, but how can i add new contractor to a certain project later on?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [May 21, 2022, 3:06am UTC](https://community.glideapps.com/t/preventing-repetition-on-many-to-many-relationship/42222/4 "2022-05-21T03:06:25Z")

</div>

To add another contractor, all you need to do is open the project, select the choice component, and select another contractor from the choice list. Since it’s a multi select choice, it will have the existing contractors already marked, and you can select additional contractors. It will just update the comma delimited list in the column.

---

<div class="post-metadata">

**Author:** ![Hani\_Ibrahim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hani_ibrahim/32/42108_2.png) [@Hani\_Ibrahim](https://community.glideapps.com/u/Hani_Ibrahim)\
**Post date:** [May 21, 2022, 3:08am UTC](https://community.glideapps.com/t/preventing-repetition-on-many-to-many-relationship/42222/5 "2022-05-21T03:08:34Z")

</div>

Thank you so much, I will try that and, if you please, i will comeback if i missed something.

Thank you so much.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [May 22, 2022, 3:08am UTC](https://community.glideapps.com/t/preventing-repetition-on-many-to-many-relationship/42222/6 "2022-05-22T03:08:43Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
