# How to Manage Selective Table Relationships in My Database?

**URL:** <https://community.glideapps.com/t/how-to-manage-selective-table-relationships-in-my-database/65868>\
**Category:** Ask for Help\
**Tags:** airtable\
**Created:** [September 7, 2023, 8:13am UTC](https://community.glideapps.com/t/how-to-manage-selective-table-relationships-in-my-database/65868 "2023-09-07T08:13:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dorian\_Libotte](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dorian_libotte/32/47187_2.png) [@Dorian\_Libotte](https://community.glideapps.com/u/Dorian_Libotte)\
**Post date:** [September 7, 2023, 8:13am UTC](https://community.glideapps.com/t/how-to-manage-selective-table-relationships-in-my-database/65868/1 "2023-09-07T08:13:14Z")

</div>

Hello everyone, I’m seeking your expertise to help me understand how to establish selective relationships between two tables in my database. My project involves working with two tables: Services and Shop. The goal is to enable users to choose a Shop when they access a Service page, while restricting this selection to certain specific shops and not all, as it currently stands.

My main challenge lies in determining the table structure to adopt in order to limit the selection of specific shops for each service. Do you have any suggestions on how to achieve this efficiently?

"I’m sending you some screenshots of my tables (I’m using Airtable tables, but I would have the same structural issue with Glide tables).

Ps : When i select a shop, i want add the record id of this shop in a form link, with my structure who the user can choose all the shops it’s good but when the structure change, i don’t know.

 ![all_shops](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/c/8cbaca57f9d2db06807a85757b10b1a1fc3c9865.png)  
 ![relation_between_shops_and_services](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/6/f6f24094d4d038f11a3891a491c7310111da6ef2.png)  
 ![shop_table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/7/d76c1ed0334bc58592e0dafe16b52c752bf65d03.png)

---

<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:** [September 7, 2023, 8:22am UTC](https://community.glideapps.com/t/how-to-manage-selective-table-relationships-in-my-database/65868/2 "2023-09-07T08:22:09Z")

</div>

It’s not clear to me what the relationship is between Services and Shops, and how you define that relationship.

Is the idea that the user first selects a Shop, and they then get presented with a list of Services offered by that Shop?

---

<div class="post-metadata">

**Author:** ![Dorian\_Libotte](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dorian_libotte/32/47187_2.png) [@Dorian\_Libotte](https://community.glideapps.com/u/Dorian_Libotte)\
**Post date:** [September 7, 2023, 9:06am UTC](https://community.glideapps.com/t/how-to-manage-selective-table-relationships-in-my-database/65868/4 "2023-09-07T09:06:16Z")

</div>

Yes, select a shop and see Services offered by that shop

---

<div class="post-metadata">

**Author:** ![HJ\_MOON](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hj_moon/32/62890_2.png) [@HJ\_MOON](https://community.glideapps.com/u/HJ_MOON)\
**Post date:** [September 7, 2023, 2:10pm UTC](https://community.glideapps.com/t/how-to-manage-selective-table-relationships-in-my-database/65868/5 "2023-09-07T14:10:54Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/9/99eddd221083954329f491e09456b12e4cf20aff.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/5/f5f90dd428ca0ee72330fefb7bfc72dd34262913.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/7/e7184a5ff74003bd150be3905223a1aa85ef98ab.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/2/7252e3ea814e42c363716eaa30fe5589174af823.jpeg)

I made simple a mockup for you

---

<div class="post-metadata">

**Author:** ![Dorian\_Libotte](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dorian_libotte/32/47187_2.png) [@Dorian\_Libotte](https://community.glideapps.com/u/Dorian_Libotte)\
**Post date:** [September 7, 2023, 2:26pm UTC](https://community.glideapps.com/t/how-to-manage-selective-table-relationships-in-my-database/65868/6 "2023-09-07T14:26:41Z")

</div>

Hello, I would like to achieve the following: when I choose a “Shop” page, and then select a page corresponding to a specific service within that shop, I want to retain the “recordId” of the shop I previously clicked on, in order to add it as a hidden field in my form. How can I accomplish this?

---

<div class="post-metadata">

**Author:** ![Dorian\_Libotte](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dorian_libotte/32/47187_2.png) [@Dorian\_Libotte](https://community.glideapps.com/u/Dorian_Libotte)\
**Post date:** [September 8, 2023, 7:16am UTC](https://community.glideapps.com/t/how-to-manage-selective-table-relationships-in-my-database/65868/7 "2023-09-08T07:16:56Z")

</div>

Hello, thank you very much for your example and your response. I am now looking for an alternative method to achieve this without using a “choice,” but I appreciate your help.

---

<div class="post-metadata">

**Author:** ![HJ\_MOON](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hj_moon/32/62890_2.png) [@HJ\_MOON](https://community.glideapps.com/u/HJ_MOON)\
**Post date:** [September 11, 2023, 8:26am UTC](https://community.glideapps.com/t/how-to-manage-selective-table-relationships-in-my-database/65868/8 "2023-09-11T08:26:49Z")

</div>

hello. Can you tell me why we need to record the IDs of the stores visited by the user? I think it would be an important design point if we need to store the IDs of all the stores visited, or just the one immediately before.
