# Dependent Dropdowns

**URL:** <https://community.plotly.com/t/dependent-dropdowns/71206>\
**Category:** Dash Python\
**Created:** [December 29, 2022, 5:18pm UTC](https://community.plotly.com/t/dependent-dropdowns/71206 "2022-12-29T17:18:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpolasek](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/bpolasek/32/22137_2.png) [@bpolasek](https://community.plotly.com/u/bpolasek)\
**Post date:** [December 29, 2022, 5:18pm UTC](https://community.plotly.com/t/dependent-dropdowns/71206/1 "2022-12-29T17:18:46Z")

</div>

Hi! Does anyone know how to make one dropdown element depend on another? I have a list of 130 engines that are categorized by 4 regions. I want the first dropdown to be the region and the second dropdown to fill the specific engines for that region.

I’m new to Dash but have been working with Flask. I got it to work in Flask but using JavaScript. Not sure if that translates into Dash well.

Let me know if that makes sense and if you have any ideas! Thanks!

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [December 29, 2022, 5:32pm UTC](https://community.plotly.com/t/dependent-dropdowns/71206/2 "2022-12-29T17:32:35Z")

</div>

hi @bpolasek

👋 Welcome to the community.

That is what we call a [chained callback](https://dash.plotly.com/basic-callbacks#dash-app-with-chained-callbacks).

You can find a few more examples in the [Dash Example Index](https://dash-example-index.herokuapp.com/), under the callbacks → chained section

---

<div class="post-metadata">

**Author:** ![bpolasek](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/bpolasek/32/22137_2.png) [@bpolasek](https://community.plotly.com/u/bpolasek)\
**Post date:** [December 29, 2022, 5:35pm UTC](https://community.plotly.com/t/dependent-dropdowns/71206/3 "2022-12-29T17:35:44Z")

</div>

Okay thanks! I will have to check it out!

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [December 29, 2022, 6:46pm UTC](https://community.plotly.com/t/dependent-dropdowns/71206/4 "2022-12-29T18:46:16Z")

</div>

Hi @bpolasek, in addition to @adamschroeder’s example here is another one:

> [@The dropdown value auto change base on first filter](https://community.plotly.com/t/the-dropdown-value-auto-change-base-on-first-filter/70409/2):
>
> Hi @Eddy , Basically you want the options of a dcc.Dropdown to be populated based on the selection of an other dcc.Dropdown. Since you are using pandas anyways, you could do something like this: from dash import Dash, Input, Output, html, dcc import dash\_bootstrap\_components as dbc import pandas as pd df = pd.DataFrame( { 'process': ['A', 'A', 'B', 'B', 'C', 'C'], 'code': [f'CODE{i}' for i in range(1, 7)], 'data': [1 for \_ in range(6)] } ) app = Dash(\_\_name\_\_,…

---

<div class="post-metadata">

**Author:** ![bpolasek](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/bpolasek/32/22137_2.png) [@bpolasek](https://community.plotly.com/u/bpolasek)\
**Post date:** [December 29, 2022, 8:10pm UTC](https://community.plotly.com/t/dependent-dropdowns/71206/5 "2022-12-29T20:10:21Z")

</div>

Thank you!!
