# Dynamic Form Filter

**URL:** <https://community.glideapps.com/t/dynamic-form-filter/14609>\
**Category:** Ask for Help\
**Created:** [August 24, 2020, 10:52pm UTC](https://community.glideapps.com/t/dynamic-form-filter/14609 "2020-08-24T22:52:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AugustoMiguel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augustomiguel/32/47516_2.png) [@AugustoMiguel](https://community.glideapps.com/u/AugustoMiguel)\
**Post date:** [August 24, 2020, 10:52pm UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/1 "2020-08-24T22:52:52Z")

</div>

Hello !!  
I have a Form with a “type” that a want to filter from a list:

How i want it to work :  
1 - select a “type” as filter from a **Choice component**  
2 - The second **Choice component** will be filtered based on the “type”.

* * *

How my spreadsheet is setup :  
| INDEX | CATEGORY | TYPE | PRODUCT | PRICE |

The setup in Glideapp :  
ColumnGroup

- Relation : [Index] \> [List \> Index]  
(This return the INDEXs from my spreadsheet into groups)

ReturnColumn

- Lookup : Relation Column : PRODUCT  
(This return the PRODUCTS from my spreadsheet into groups)

I have it grouped by TYPE, Now… how can i get the grouped items into the second “choice component”. It has to change dynamic inside the FORM, using the other “choice component”.

* * *

I saw this working outside the form… is there a way to work inside the form without the need to sent it?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 25, 2020, 12:34am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/2 "2020-08-25T00:34:36Z")

</div>

No, at the moment there’s no way to do this.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 25, 2020, 12:35am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/3 "2020-08-25T00:35:49Z")

</div>

A non-scalable workaround is to have multiple choice components for the second one, then hide/show them based on the first one’s choice.

---

<div class="post-metadata">

**Author:** ![AugustoMiguel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augustomiguel/32/47516_2.png) [@AugustoMiguel](https://community.glideapps.com/u/AugustoMiguel)\
**Post date:** [August 25, 2020, 1:31am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/4 "2020-08-25T01:31:46Z")

</div>

Thanks for the reply ThinhDinh.

I did a workaround like this once.  
I use a INLIST with pre-filtered items.

But i would have several of them… for two “choice components”.  
If there was a way to get the ITEM from a “choice component” as a filter to the second “choice component”… that would be more clean than several adicional INLISTs.

---

<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:** [August 25, 2020, 1:57am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/5 "2020-08-25T01:57:22Z")

</div>

You can’t do relations within a form but can you create a filter on the second choice based on the first choice selected value using the screen value?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/d/d0a14136f6a4dbca68c4c43830e1f19cfbd819ac.png)

---

<div class="post-metadata">

**Author:** ![AugustoMiguel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augustomiguel/32/47516_2.png) [@AugustoMiguel](https://community.glideapps.com/u/AugustoMiguel)\
**Post date:** [August 25, 2020, 2:03am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/6 "2020-08-25T02:03:17Z")

</div>

Thanks for the reply Jeff\_Hager.

How this is setup?

---

<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:** [August 25, 2020, 2:31am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/7 "2020-08-25T02:31:41Z")

</div>

Just add a filter on your second choice component. In the first dropdown of the choice filter settings, select the column that you want to filter in your second choice list. In the second dropdown, select the screen column value that was set by the first choice component. This will filter out only those choices that are related to your first choice component. Just like what the screenshot shows.

---

<div class="post-metadata">

**Author:** ![AugustoMiguel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augustomiguel/32/47516_2.png) [@AugustoMiguel](https://community.glideapps.com/u/AugustoMiguel)\
**Post date:** [August 25, 2020, 3:01am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/8 "2020-08-25T03:01:44Z")

</div>

Ok. I tried. No success

My spreadsheet destination is whrere i want to store my data…  
So the “Screens” option does’not work.

How i did :  
**Destinaton Sheet :** ORDERS

[1ª Option]  
The first choice dropdown, i have the TYPEs i want to search. Pre-filled.

[2ª Option] The second is where i want the ITEMS to be (dynamic), based on the dropdown choise (1)

---

<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:** [August 25, 2020, 3:07am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/9 "2020-08-25T03:07:41Z")

</div>

Can you show a screenshot of the filter settings for the second choice component? Also specify which column is filled by the first choice component and the column you want to filter by in the sheet used for the second choice component. The destination sheet shouldn’t matter.

---

<div class="post-metadata">

**Author:** ![AugustoMiguel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augustomiguel/32/47516_2.png) [@AugustoMiguel](https://community.glideapps.com/u/AugustoMiguel)\
**Post date:** [August 25, 2020, 3:27am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/10 "2020-08-25T03:27:22Z")

</div>

I’ll share the link of my app… maybe you can say where i went wrong.

[https://tender-coat-3963.glideapp.io/](https://tender-coat-3963.glideapp.io/)

---

<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:** [August 25, 2020, 3:30am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/11 "2020-08-25T03:30:53Z")

</div>

That won’t help me. I would need to see if your settings are wrong or not.

---

<div class="post-metadata">

**Author:** ![AugustoMiguel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augustomiguel/32/47516_2.png) [@AugustoMiguel](https://community.glideapps.com/u/AugustoMiguel)\
**Post date:** [August 25, 2020, 8:10pm UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/12 "2020-08-25T20:10:24Z")

</div>

I understand Jeff\_Hager.

The first **Choise Component** is filled from a **Choice** spreadsheet.  
What is ok.

Here is the second **Choice Component** :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/4/48cfa0b46d67c5ff78e101ac99f2b0a4653adf4b.png)

Its values came from a spreadsheet called **List** , where i have all items from my app… this is my data base.

Here is the filter from the second **Choice Component** :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/2/2c8c453f39ed580c6a50ced5f3701c11412f38bd.png)

It has already a filter by **Type of  
beverage**. And all happens inside a form.

---

<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:** [August 25, 2020, 8:17pm UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/13 "2020-08-25T20:17:43Z")

</div>

Is the filter for the second choice component using the screen value to filter only the values from the first choice on the screen?

---

<div class="post-metadata">

**Author:** ![AugustoMiguel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augustomiguel/32/47516_2.png) [@AugustoMiguel](https://community.glideapps.com/u/AugustoMiguel)\
**Post date:** [August 25, 2020, 9:14pm UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/14 "2020-08-25T21:14:48Z")

</div>

No. It isn’t using a **Screen Value**.  
I could not set it up correctly. Even the way you explain it, i could only get all items from my **List** spreadsheet. Like there wasnt a filter in place.

---

<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:** [August 25, 2020, 9:32pm UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/15 "2020-08-25T21:32:48Z")

</div>

Can you set your app so I can copy it. I don’t know what to tell you without seeing it myself.

[https://docs.glideapps.com/all/reference/templates/copy-app-as-template](https://docs.glideapps.com/all/reference/templates/copy-app-as-template)

---

<div class="post-metadata">

**Author:** ![AugustoMiguel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augustomiguel/32/47516_2.png) [@AugustoMiguel](https://community.glideapps.com/u/AugustoMiguel)\
**Post date:** [August 25, 2020, 10:05pm UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/16 "2020-08-25T22:05:29Z")

</div>

It is set to copy now. Hope you can help me

---

<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:** [August 26, 2020, 12:02am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/18 "2020-08-26T00:02:14Z")

</div>

I’m not sure why you were just typing in a value instead of using the value set by the first choice component, but this is how it should be set up:

Using the first drink choice components, I selected ‘Tin’ (Latinha). Then I set the filter on the second choice component to filter only the types where the First Type of Drink is the value from the screen (Tin). That way only the choices that match the chosen type are displayed.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/e9a5ad17e5972f6ada056f2bb913c4d830d608cb.png)

Pay attention to the fact that I’m using the selected Type of Drink from the Screen.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/ea5a942de8f1578d5297f820ab3d2477eb40376c.png)

Here selected Latinha:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/0/05931cb0516c9d90a3aada821a4ef26bf35d0d1b.png)

Here are the only results that show in the second choice component:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/2/24966462e326be6a9b7cfb4690f8b28e4172ce39.png)

---

<div class="post-metadata">

**Author:** ![AugustoMiguel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augustomiguel/32/47516_2.png) [@AugustoMiguel](https://community.glideapps.com/u/AugustoMiguel)\
**Post date:** [August 26, 2020, 12:12am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/19 "2020-08-26T00:12:24Z")

</div>

Thanks Jeff\_Hager.  
That helped a lot.  
I’m very new to this… by understanding how things works, we can make better applications.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 26, 2020, 3:37am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/20 "2020-08-26T03:37:36Z")

</div>

Just wanna ask after reading this again Jeff, as I was wandering around this the other day with a client app.

- I have one column of car brands and one column of car models (one brand can have many models).

- In the form, I make the user choose the brand in a choice component first.

- In the second component, with the current screen filtering, I can’t filter the car models by the choice the user has made in the car brands, is that correct?

---

<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:** [August 26, 2020, 3:50am UTC](https://community.glideapps.com/t/dynamic-form-filter/14609/21 "2020-08-26T03:50:26Z")

</div>

It should work as you describe. That’s what I demonstrated above. I guess I didn’t look at @AugustoMiguel’s sheets, but it’s my understanding that the beverage types and beverages were in the same sheet. The first choice component listed the types of beverages and the second choice component listed the beverage names. Using the chosen value from the first choice I was able to filter the second choice by comparing the type column in the sheet to the screen value of the column set by the first choice component.

[Next page](https://community.glideapps.com/t/dynamic-form-filter/14609.md?page=2)
