# Populate choice box depending on another choice box

**URL:** https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498
**Category:** Ask for Help
**Created:** [April 13, 2021, 1:02pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498 "2021-04-13T13:02:50Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)
#### Post date: [April 13, 2021, 1:02pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/1 "2021-04-13T13:02:50Z")

</div>

Hi!  
I am trying to populate Choice Box #2 depending on option form Choice Box #1.

I can’t seem to find a way to use filters to “tell” glide to only show those rows that match Choice Box #1 selection.

Is there anyway this can be achieved?  
Thanks a lot!

---

<div class="post-metadata">

### Author: ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)
#### Post date: [April 13, 2021, 1:22pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/2 "2021-04-13T13:22:37Z")

</div>

Filter with the screen value, I think that would solve your issue

---

<div class="post-metadata">

### Author: ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)
#### Post date: [April 13, 2021, 2:11pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/3 "2021-04-13T14:11:08Z")

</div>

Thanks a lot @PabloMFalero , the solution is not working but I think it is because inside an “Add Items” screen so it might be returning blank for the value I need.

I might need to modify the flow in order for “screen value” to return what I need.

Thanks a lot for the tip on the screen value!

---

<div class="post-metadata">

### Author: ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)
#### Post date: [April 13, 2021, 3:34pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/4 "2021-04-13T15:34:36Z")

</div>

Do you know of any way to print screen values inside the “Add items” screen?

I would like to understand whats inside some of the values, but I can’t find a way to attach a screen value to an element inside the add items view.

---

<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: [April 13, 2021, 11:32pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/5 "2021-04-13T23:32:55Z")

</div>

In your choice component #2, is there not an option to filter by screen’s choice component 1 value?

---

<div class="post-metadata">

### Author: ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)
#### Post date: [April 14, 2021, 2:57am UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/6 "2021-04-14T02:57:41Z")

</div>

Hi! thanks for reaching back.

I do see the the value when I set the filter  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/4/b432df30c75dc2db3f5a1e40ce98911fa5ac10fd.png)

The thing is that the choice list is coming up blank, that’s why I was wondering if I could place in a text the values for “vendor ID” and “screen vendor ID”

Again, thanks for your help

---

<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: [April 14, 2021, 4:16am UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/7 "2021-04-14T04:16:28Z")

</div>

If it’s the second choice component in the screen, shouldn’t the filter be vendor ID is not screen’s first choice component value. Is that value available at all to you?

I believe it works normally in a form, not sure how it functions in an add environment.

---

<div class="post-metadata">

### Author: ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)
#### Post date: [April 14, 2021, 1:22pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/8 "2021-04-14T13:22:32Z")

</div>

Thanks again for your time @ThinhDinh !

So, basically this is my DB structure.

I have an `orders` table and a `products in order` table linked by `order id`.

This is the “add items” screen for the `products in order table`.

On Choice #1 the user selects the order from the `order` table  
On Choice #2 I want to only show products from the products table that match the vendor ID that comes from the `order(vendor ID)` table chosen on Choice #1

Unfortunately when I do this ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/4/b432df30c75dc2db3f5a1e40ce98911fa5ac10fd.png)  
It returns empty, that is why it would be awesome to be able to debug the values in order to understand what is going on, but I can’t find any way to print those values anywhere on the screen.

Again, if you have any suggestion I will super appreciate it.  
Thanks for your time.

---

<div class="post-metadata">

### Author: ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)
#### Post date: [April 14, 2021, 11:20pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/9 "2021-04-14T23:20:48Z")

</div>

Currently to do this easily, you can use a detail screen by building whatever you need there. I’m going to sleep now, but tomorrow, unless my dear friend @ThinhDinh has already intervened, I’ll send you a working example.

---

<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: [April 14, 2021, 11:37pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/10 "2021-04-14T23:37:12Z")

</div>

@Yakito here’s a working example.

> **[Screen Recording 2021-04-15 at 06.35.47 AM](https://media.lowcode.agency/Blu4Yv98)**

Link to copy back: [https://tdslab.glideapp.io/](https://tdslab.glideapp.io/)

---

<div class="post-metadata">

### Author: ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)
#### Post date: [April 15, 2021, 1:53am UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/11 "2021-04-15T01:53:08Z")

</div>

Thanks a lot! will try to replicate that with my setup. I will get back to mark it as solution.

Thanks a lot for your time and help!

---

<div class="post-metadata">

### Author: ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)
#### Post date: [April 15, 2021, 1:25pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/12 "2021-04-15T13:25:10Z")

</div>

Thanks a lot for your help @Roldy and @ThinhDinh

Also, Happy Birthday @ThinhDinh  
Have a beautiful day!  
🍰 🎂 🎆

---

<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: [April 15, 2021, 11:02pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/13 "2021-04-15T23:02:34Z")

</div>

Great to have helped!

---

<div class="post-metadata">

### Author: ![MTS](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@MTS](https://community.glideapps.com/u/MTS)
#### Post date: [November 5, 2021, 4:42am UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/14 "2021-11-05T04:42:37Z")

</div>

Hello @ThinhDinh !

Can you tell me if this same method for filtering a choice based on the selection in the first choice works with pages? I’ve been trying for days to get this to work in pages, but I was able to get it to work in an app the first time with no assistance.

works in app: [https://solitary-grain-6435.glideapp.io/](https://solitary-grain-6435.glideapp.io/)  
racking my brain in pages: [https://dashing-earthquake-3610.glide.page/](https://dashing-earthquake-3610.glide.page/)

When I add the filter to the second choice field (description) the choice field disappears. I’ve tried the entire method in other ways besides the form. Nothing works.

Thanks for your help!

---

<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: [November 5, 2021, 7:43am UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/15 "2021-11-05T07:43:57Z")

</div>

I haven’t touched Pages much. Can you record a video of the supposed bug in Pages? Thanks a lot!

---

<div class="post-metadata">

### Author: ![MTS](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@MTS](https://community.glideapps.com/u/MTS)
#### Post date: [November 5, 2021, 5:20pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/16 "2021-11-05T17:20:38Z")

</div>

Thanks so much for your quick reply!

Here’s the video of it not working in pages and also showing it working in the app.

[https://youtu.be/0tVPnj9NQVU](https://youtu.be/0tVPnj9NQVU)

Thanks!

---

<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: [November 5, 2021, 10:43pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/17 "2021-11-05T22:43:28Z")

</div>

@SantiagoPerez can you take a look and potentially talk to engineer about this? Thanks a lot!

---

<div class="post-metadata">

### Author: ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)
#### Post date: [November 5, 2021, 11:06pm UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/18 "2021-11-05T23:06:43Z")

</div>

We are looking into this.

---

<div class="post-metadata">

### Author: ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)
#### Post date: [November 6, 2021, 12:09am UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/19 "2021-11-06T00:09:30Z")

</div>

> [@Bug no Choice](https://community.glideapps.com/t/bug-no-choice/34093/8):
>
> This has been fixed. You need to go into the builder and refresh the browser, maybe a couple of times, then your app is ready to take your single options again.

---

<div class="post-metadata">

### Author: ![MTS](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@MTS](https://community.glideapps.com/u/MTS)
#### Post date: [November 6, 2021, 4:12am UTC](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498/20 "2021-11-06T04:12:07Z")

</div>

Thanks for working on this, Santiago.

I refreshed and restarted my browser a few times, cleared cache, etc. tried in a private window, rebuilt the screen, form, and choice items again, but still experiencing the same issue.

[https://www.loom.com/share/a9e67d5316c74fcbbdf1679d8c7391ca](https://www.loom.com/share/a9e67d5316c74fcbbdf1679d8c7391ca)

Let me know if there’s something else I should try or if I’m building this incorrectly.

Thanks!

[Next page](https://community.glideapps.com/t/populate-choice-box-depending-on-another-choice-box/25498.md?page=2)
