# Depending on the selected dealer, the list should include specific cars that are under this dealer and not all available cars

**URL:** https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341
**Category:** Ask for Help
**Created:** [July 25, 2023, 7:17am UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341 "2023-07-25T07:17:25Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![vchupilka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vchupilka/32/62153_2.png) [@vchupilka](https://community.glideapps.com/u/vchupilka)
#### Post date: [July 25, 2023, 7:17am UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/1 "2023-07-25T07:17:25Z")

</div>

Hi to all.  
I am creating a small application. I have seven dealers, each dealer has a certain number of cars. When choosing a dealer from the list, the cars of this particular dealer should be displayed. At the moment, it shows all the cars of all dealers  
I make the application based on Airtable.

---

<div class="post-metadata">

### Author: ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)
#### Post date: [July 25, 2023, 7:39am UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/2 "2023-07-25T07:39:43Z")

</div>

Hello, welcome to the community forum.

**In the Data Editor**

- Cars table: Car name. Dealer name.
- Dealers table: Dealer name. Multi-relation to Cars table along Dealer name.

**In the Layout Editor**

- Add a collection with data source Dealers table. Item click is show detail screen.
- On Dealers detail screen, add a collection with data source the multi-relation.

For more information about `relations`.

> **[Glide • Relations](https://www.glideapps.com/docs/reference/computed-columns/relations)**
>
> Create relationships and link rows together.

(For a more advanced setup of your relation, you would relate row ID rather than category name, since row IDs will not change but names might.)

---

<div class="post-metadata">

### Author: ![vchupilka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vchupilka/32/62153_2.png) [@vchupilka](https://community.glideapps.com/u/vchupilka)
#### Post date: [July 26, 2023, 2:33pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/3 "2023-07-26T14:33:15Z")

</div>

Hello, thanks for your help.  
But i still cant understand how to make - “When choosing a dealer from the list, the cars of this particular dealer should be displayed”.

 ![Cars table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/e/5efa8e1c3d5a27da5e8761a374a04713f085b7ef.png)  
 ![Choose dealer](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/a/2a55315bc4c7a141c7817f6af4dcbe1e4ea1f5f6.png)  
 ![Dealers table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/3/032342ae94a23a2906972ec1e9edb8734331f15e.png)  
 ![VINs](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/c/bcdae8df746116395470c04d8ec8d5fbd24e8d1a.png)

I choosed a dealer and then i saw all cars from other dealer too.

---

<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: [July 26, 2023, 2:36pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/4 "2023-07-26T14:36:41Z")

</div>

Are you using the relation as the source of the collection?

> [@nathanaelb](#):
>
> On Dealers detail screen, add a collection with data source the multi-relation.

---

<div class="post-metadata">

### Author: ![vchupilka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vchupilka/32/62153_2.png) [@vchupilka](https://community.glideapps.com/u/vchupilka)
#### Post date: [July 26, 2023, 2:48pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/5 "2023-07-26T14:48:00Z")

</div>

Iam using a cars table as sourse of a collection.

 ![Dealers table_1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/8/68146a0330ed20450e29d66697e2e7f566ca8875.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: [July 26, 2023, 3:21pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/6 "2023-07-26T15:21:09Z")

</div>

I thought you wanted to start with a list of Dealers, select a Dealer, and then show a list of Cars that are related to that Dealer?

How would you expect that to work if you start with a list of Cars?

@nathanaelb gave you the steps:

> [@nathanaelb](#):
>
> **In the Data Editor**
> 
> - Cars table: Car name. Dealer name.
> - Dealers table: Dealer name. Multi-relation to Cars table along Dealer name.
> 
> **In the Layout Editor**
> 
> - Add a collection with data source Dealers table. Item click is show detail screen.
> - On Dealers detail screen, add a collection with data source the multi-relation.

Have you tried following those steps?  
Have you created the multiple relation column in your Dealers table that matches the Dealer name with the same value in the Cars table? This is the key thing that you need to do to make this work. Once you have that relation, you use it as the source of a collection on your Dealers details screen (the screen you see when you click on one of the Dealers).

---

<div class="post-metadata">

### Author: ![vchupilka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vchupilka/32/62153_2.png) [@vchupilka](https://community.glideapps.com/u/vchupilka)
#### Post date: [July 26, 2023, 4:03pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/7 "2023-07-26T16:03:42Z")

</div>

Yes, everything is correct.

I want to make it so that when choosing a dealer from the list, only the cars of the dealer I chose are displayed in the next window.

I made the necessary connection. Screenshot below:

 ![Dealer_Table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/9/39b6cfdb4ad1df725a9adeb5df572f6581d192fe.png)  
 ![Relation](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/b/bb577b74c83389fe7f0d8b5173893e15738a30bb.png)

But when I choose a dealer, I see all cars and other dealers as well.

 ![Cars Table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/2/02711b239c86ddf7c7ed401011b79f92c7888e4c.png)

---

<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: [July 26, 2023, 4:22pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/8 "2023-07-26T16:22:04Z")

</div>

Did you change the source of the Cars collection on your Dealer detail screen to use the relation?

---

<div class="post-metadata">

### Author: ![vchupilka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vchupilka/32/62153_2.png) [@vchupilka](https://community.glideapps.com/u/vchupilka)
#### Post date: [July 26, 2023, 4:28pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/9 "2023-07-26T16:28:08Z")

</div>

Soory, but I am new in Glide, can you show where Ican choose this?

We are talking about this (thsi is dealers choise screen) ?

 ![Dealer Choise](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/e/8e2284a2fef32f307130b792d84042a8b133605f.png)

---

<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: [July 26, 2023, 4:34pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/10 "2023-07-26T16:34:30Z")

</div>

Does your button take you to a detail screen for the dealer? What’s the action on your button?

---

<div class="post-metadata">

### Author: ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)
#### Post date: [July 26, 2023, 4:38pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/11 "2023-07-26T16:38:54Z")

</div>

Hi @vchupilka,

Nathan and Darren already provided the solution! Just adding this video that maybe helpful!

> **[Dealers and Cars.mp4](https://drive.google.com/file/d/1TroDhMLNEDSQVC1Cb2K_upEWPDKmJwb4/view?usp=sharing)**
>
> Google Drive file.

If my setup is different from the way you have setup-ed let me know!

Thank you

---

<div class="post-metadata">

### Author: ![vchupilka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vchupilka/32/62153_2.png) [@vchupilka](https://community.glideapps.com/u/vchupilka)
#### Post date: [July 27, 2023, 12:45pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/12 "2023-07-27T12:45:13Z")

</div>

Thanks !

Everything works

---

<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: [July 28, 2023, 12:45pm UTC](https://community.glideapps.com/t/depending-on-the-selected-dealer-the-list-should-include-specific-cars-that-are-under-this-dealer-and-not-all-available-cars/64341/13 "2023-07-28T12:45:14Z")

</div>

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