# Dropdown Menu and Subs Best Options

**URL:** <https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400>\
**Category:** Ask for Help\
**Created:** [November 17, 2022, 8:55pm UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400 "2022-11-17T20:55:24Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![MisteryInc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misteryinc/32/75017_2.png) [@MisteryInc](https://community.glideapps.com/u/MisteryInc)\
**Post date:** [November 17, 2022, 8:55pm UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/1 "2022-11-17T20:55:24Z")

</div>

I’m trying to have my secondary dropdown options only show specific choices based off the primary dropdown option.

I tried doing this via the Else-If-Then column but it just limited my selection no matter what choice I clicked.

Here is an example:

![Choice 2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/c/5c2d487f942f514dc63d6e2b339623a1de84537c.png)

I herd that the array option is the best way to do it but does that mean I have to change these columns into arrays?

 ![Choices.PNG](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/1/916f9039cf3124cd3c01ecaa9a88b299b492646c.jpeg)

Here is what I’m trying to do:

 ![Choice 3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/c/bc63e59ed7588adfb05330a4a356846c869af30f.png)

This is for Pages

---

<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:** [November 17, 2022, 9:31pm UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/2 "2022-11-17T21:31:00Z")

</div>

You can set a filter on your secondary choice component based on the ‘Screen Value’ of the first selected choice.

---

<div class="post-metadata">

**Author:** ![MisteryInc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misteryinc/32/75017_2.png) [@MisteryInc](https://community.glideapps.com/u/MisteryInc)\
**Post date:** [November 17, 2022, 10:22pm UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/3 "2022-11-17T22:22:16Z")

</div>

Do you mean “Filter Data?” If so, all that does it make my dropdown disappear.

---

<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:** [November 17, 2022, 10:42pm UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/4 "2022-11-17T22:42:47Z")

</div>

It shouldn’t unless you are adding a visibility condition instead of a filter condition. Can you share a screenshot of how you filter is configured for your choice component?

---

<div class="post-metadata">

**Author:** ![MisteryInc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misteryinc/32/75017_2.png) [@MisteryInc](https://community.glideapps.com/u/MisteryInc)\
**Post date:** [November 17, 2022, 10:57pm UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/5 "2022-11-17T22:57:49Z")

</div>

Here.

 ![Choice 4](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/b/dbbbb21f19f3da425d922b941c6d46bdcdd5fc11.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:** [November 18, 2022, 12:18am UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/6 "2022-11-18T00:18:43Z")

</div>

Couple of things:

It doesn’t look like you are setting the filter correctly. It looks like you specifying a specific category and subcategory by typing them into the filter manually instead of using ‘Screen Values’.

The choice component may not be showing because you have filtered out all possibilities and it’s empty. From what I can see, there is no row in your table that contains both an ‘Automotive’ category, as well as a ‘Cars and Truck Parts’ Subcategory. There is however a row that contain ‘Automotive’ and ‘Bathroom Accessories’…as well as a row that contains ‘Computers Tablets’ and ‘Cars and Truck Parts’.

Based on how your data is structured, I’m not sure how you are trying to establish which subcategories belong to which category. I don’t see anything in your data to establish that connection.

What I think you need is a column to list all categories, and then two columns for the subcategory. One for the subcategory name and one for the category that it belongs to. (something like ‘SubcategoryName’ and ‘SubcategoryCategory’). Then it should be easy to create a filter on the subcategory choice component where the SubcategoryCategory is Screen → Category.

---

<div class="post-metadata">

**Author:** ![MisteryInc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misteryinc/32/75017_2.png) [@MisteryInc](https://community.glideapps.com/u/MisteryInc)\
**Post date:** [November 18, 2022, 1:01am UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/7 "2022-11-18T01:01:39Z")

</div>

> [@Jeff\_Hager](#):
>
> you need is a column to list all categories, and then two columns for the subcategory. One for the subcategory name and one for the category that it belongs to. (something like ‘SubcategoryName’ and ‘SubcategoryCategory’). Then it should be easy to create a filter on the subcategory choice component where the SubcategoryCategory is Screen → Category.

I’m not following in your third example as I don’t get what you mean by SubcatgoryName and SubcategoryCategory. Is that the same? I’m trying to recreate what I had posted in my Bubble example so I don’t have to list all the categories in a single row as I want to keep it organized.

---

<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:** [November 18, 2022, 1:04am UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/8 "2022-11-18T01:04:55Z")

</div>

Let’s start by answering this question. By simply looking at your table data, how do you know that the subcategory ‘Cars and Truck Parts’ belongs to the category ‘Automotive’? You should be able to know simply by looking at your data. I personally don’t see anything in your data that represents which category a subcategory belongs to.

---

<div class="post-metadata">

**Author:** ![MisteryInc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misteryinc/32/75017_2.png) [@MisteryInc](https://community.glideapps.com/u/MisteryInc)\
**Post date:** [November 18, 2022, 2:05am UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/9 "2022-11-18T02:05:22Z")

</div>

Okay. So what I’m trying to do is eliminate the majority of subcategory options based on the primary category. While the data on the sheet doesn’t connect to each other, I was trying to find a way to filter it out. I was also hoping to do so with the Else-If row but it is limited.

---

<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:** [November 18, 2022, 2:23am UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/10 "2022-11-18T02:23:16Z")

</div>

Well, it will be really easy to create that filter if you add an extra column next to the subcategory and fill it with the category name that’s associated with that subcategory. I think you are overcomplicating it.

Honestly, instead of adding another column, I would probably just fill the subcategory column with the subcategory that is associated with the 3rd category, and likewise fill the category column with the category that’s associated with the subcategory. So in the end, the category column and subcategory column will have duplicates, and each column will populate the same number of rows.

You have to set up your data so things can connect together. I have no idea how you are attempting to do it with an IF column, but that shouldn’t be necessary. Think of the 3rd category as the primary column, then fill subcategory and category with the appropriate value that relates to each 3rd category.

---

<div class="post-metadata">

**Author:** ![MisteryInc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misteryinc/32/75017_2.png) [@MisteryInc](https://community.glideapps.com/u/MisteryInc)\
**Post date:** [November 18, 2022, 2:40am UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/11 "2022-11-18T02:40:53Z")

</div>

> [@Jeff\_Hager](#):
>
> tead of adding another column, I would probably just fill the subcategory column with the subcategory that is associated with the 3rd category, and likewise fill the category column with the category that’s associated with the subcategory. So in the end, the category column and subcategory column will have duplicates, and each column will populate the same number of rows.

Alright. Let me try it out and get back to you. “Cracks fingers”

---

<div class="post-metadata">

**Author:** ![MisteryInc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misteryinc/32/75017_2.png) [@MisteryInc](https://community.glideapps.com/u/MisteryInc)\
**Post date:** [November 18, 2022, 3:47am UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/12 "2022-11-18T03:47:23Z")

</div>

Just as I thought I understand, I’m still confused.

How would I go about adding the columns? I think I get it but then it just gets confusing.

---

<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:** [November 18, 2022, 3:54am UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/13 "2022-11-18T03:54:39Z")

</div>

Are you going to add columns like I mentioned in my first suggestion, or are you just going to use your existing columns like I mentioned in my second suggestion?

If you are adding columns, then you can click on the the Plus button at the top right of the data editor.

---

<div class="post-metadata">

**Author:** ![MisteryInc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misteryinc/32/75017_2.png) [@MisteryInc](https://community.glideapps.com/u/MisteryInc)\
**Post date:** [November 18, 2022, 10:14pm UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/14 "2022-11-18T22:14:04Z")

</div>

I think I might have not explained my confusion better but I think I can now.

Using your first example, would it go like this

**Category**  
Arts & Collectibles  
Automotive  
Baby  
Books

**AutomotvieCategory**  
Car & Truck Parts  
Motorcycle Parts  
Wheels & Tires  
Is this what you are trying to say?

---

<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:** [November 18, 2022, 11:28pm UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/15 "2022-11-18T23:28:03Z")

</div>

No, based on my first suggestion where you add additional columns, it would be something like this.

| Category | SubCategory-Category | SubCategory | ThirdCategory-SubCategory | ThirdCategory |
| --- | --- | --- | --- | --- |
| Arts & Collectibles | Arts & Collectibles | … | … | … |
| Automotive | Automotive | Car & Truck Parts | … | … |
| Baby | Automotive | Motorcycle Parts | … | … |
| Books | Automotive | Wheels & Tires | … | … |
| … | Baby | … | … | … |
| … | Baby | … | … | … |
| … | Baby | … | … | … |
| … | Books | … | … | … |
| … | Books | … | … | … |
| … | Books | … | … | … |

* * *

But in honestly, based on my second suggestion, I think this would be better since you wouldn’t have to add extra columns and you can use the ones you already have.

| Category | SubCategory | ThirdCategory |
| --- | --- | --- |
| Arts & Collectibles | … | … |
| Arts & Collectibles | … | … |
| Arts & Collectibles | … | … |
| … | … | … |
| Automotive | Car & Truck Parts | Carburator |
| Automotive | Car & Truck Parts | Engine |
| Automotive | Car & Truck Parts | Steering Wheel |
| Automotive | Motorcycle Parts | Clutch |
| Automotive | Motorcycle Parts | Forks |
| Automotive | Motorcycle Parts | Brakes |
| Automotive | Wheels & Tires | All-Season |
| Automotive | Wheels & Tires | Off-Road |
| Automotive | Wheels & Tires | Touring |
| … | … | … |
| Baby | … | … |
| Baby | … | … |
| Baby | … | … |
| … | … | … |
| Books | … | … |
| Books | … | … |
| Books | … | … |
| … | … | … |

---

<div class="post-metadata">

**Author:** ![MisteryInc](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misteryinc/32/75017_2.png) [@MisteryInc](https://community.glideapps.com/u/MisteryInc)\
**Post date:** [November 19, 2022, 2:52am UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/16 "2022-11-19T02:52:08Z")

</div>

Okay it worked!

Here is a photo!

 ![works](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/a/4aa640670d76712d0bbf48b97626a47d9a36fc87.png)

It’s going to be hell to reorganized tho.

---

<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:** [November 20, 2022, 2:52am UTC](https://community.glideapps.com/t/dropdown-menu-and-subs-best-options/54400/17 "2022-11-20T02:52:48Z")

</div>

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