# Displaying products based on category

**URL:** <https://community.glideapps.com/t/displaying-products-based-on-category/63920>\
**Category:** Ask for Help\
**Created:** [July 14, 2023, 7:09pm UTC](https://community.glideapps.com/t/displaying-products-based-on-category/63920 "2023-07-14T19:09:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![StefanvanLierop](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stefanvanlierop/32/61663_2.png) [@StefanvanLierop](https://community.glideapps.com/u/StefanvanLierop)\
**Post date:** [July 14, 2023, 7:09pm UTC](https://community.glideapps.com/t/displaying-products-based-on-category/63920/1 "2023-07-14T19:09:51Z")

</div>

Hello Gilders, I have created an app with products (table) and relating categories (table).

Now I want to create a custom screen with the categories and when I click on a category I want to show all the products who belong to that specific category.

How can I do this dynamically, so that I don’t have to create different screens for every category?

---

<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 14, 2023, 7:20pm UTC](https://community.glideapps.com/t/displaying-products-based-on-category/63920/2 "2023-07-14T19:20:22Z")

</div>

- In your Categories table, create a multiple relation column that matches the Category name with the same value in your Products table
- Create a screen/tab, and set the Categories table as the source
- Click on one of the Categories to navigate to its Details screen
- On that screen, add another Collection and set the multiple relation column as the source.

---

<div class="post-metadata">

**Author:** ![StefanvanLierop](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stefanvanlierop/32/61663_2.png) [@StefanvanLierop](https://community.glideapps.com/u/StefanvanLierop)\
**Post date:** [July 14, 2023, 7:40pm UTC](https://community.glideapps.com/t/displaying-products-based-on-category/63920/3 "2023-07-14T19:40:50Z")

</div>

I don’t know exactly what I’m doing…

I do have a ‘Category’ and a ‘Category Relation’ collumn in my Products table. Do I have to keep these collumns?

---

<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 14, 2023, 7:43pm UTC](https://community.glideapps.com/t/displaying-products-based-on-category/63920/4 "2023-07-14T19:43:16Z")

</div>

You don’t need the Category Relation column in the Products table. The important one you need is the relation in the Category table to link the category in that table to the category in the Product table.

---

<div class="post-metadata">

**Author:** ![StefanvanLierop](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stefanvanlierop/32/61663_2.png) [@StefanvanLierop](https://community.glideapps.com/u/StefanvanLierop)\
**Post date:** [July 15, 2023, 8:59am UTC](https://community.glideapps.com/t/displaying-products-based-on-category/63920/5 "2023-07-15T08:59:07Z")

</div>

It’s working now.

But I had to create a relating collumn from my Products table to my Categories table to populate the choice field when editing a Product or creating a new Product.

Is that the correct way?

---

<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 15, 2023, 9:53am UTC](https://community.glideapps.com/t/displaying-products-based-on-category/63920/6 "2023-07-15T09:53:21Z")

</div>

> [@StefanvanLierop](#):
>
> populate the choice field when editing a Product or creating a new Product.

You should be able to use your Categories table as the source of that Choice component.

---

<div class="post-metadata">

**Author:** ![StefanvanLierop](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stefanvanlierop/32/61663_2.png) [@StefanvanLierop](https://community.glideapps.com/u/StefanvanLierop)\
**Post date:** [July 15, 2023, 9:59am UTC](https://community.glideapps.com/t/displaying-products-based-on-category/63920/7 "2023-07-15T09:59:39Z")

</div>

I will try that!

---

<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 16, 2023, 10:00am UTC](https://community.glideapps.com/t/displaying-products-based-on-category/63920/8 "2023-07-16T10:00:19Z")

</div>

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