# Automatic dependent dropdown lists with querys

**URL:** <https://forum.inductiveautomation.com/t/automatic-dependent-dropdown-lists-with-querys/102507>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 18, 2025, 5:00pm UTC](https://forum.inductiveautomation.com/t/automatic-dependent-dropdown-lists-with-querys/102507 "2025-02-18T17:00:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Lopez](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@Jose\_Lopez](https://forum.inductiveautomation.com/u/Jose_Lopez)\
**Post date:** [February 18, 2025, 5:00pm UTC](https://forum.inductiveautomation.com/t/automatic-dependent-dropdown-lists-with-querys/102507/1 "2025-02-18T17:00:25Z")

</div>

Good afternoon, I have a question.... Is there any way that if I select the "dropdown\_code" with its corresponding code, the value will automatically change in the "dropdown\_description"? As you can see, there are two dependent dropdown lists. I have tried to change the second dropdown "dropdown\_description" for a "text\_field" but when I place the query with a property it brings it as a -dataset- and not as a value to display, like a string.... Any idea?. I leave some captures and the queries I used.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/b/5b5ef96b2fc8c9714f2241874194f290fd458663.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/0/b02153ab11eaca220249c02d8638dd9b41953bd0.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/1/f137c27b1bdf82e25b8b495d2c2fbdea0547c1f7.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/6/06d338bdab158ca21d223b5743aa3716d7728e14.png)  
The intention is that when selecting the code from the first drop-down list the description of that code is automatically displayed. The following image shows how the query works but the idea is that it does not have to be selected...  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/8/48ae91b57baa2b0431c5d7ffd08c121b727337f2.png)

PS: Forgive me for my English, I'm helping myself with Google Translate...

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [February 18, 2025, 6:24pm UTC](https://forum.inductiveautomation.com/t/automatic-dependent-dropdown-lists-with-querys/102507/2 "2025-02-18T18:24:16Z")

</div>

Hi Jose,

- Set the query type of your named query to 'Scalar Query'.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/a/fab7b3355ff407eee1d637c5f0046c1e09b6fe97.png)

---

<div class="post-metadata">

**Author:** ![Jose\_Lopez](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@Jose\_Lopez](https://forum.inductiveautomation.com/u/Jose_Lopez)\
**Post date:** [February 18, 2025, 6:44pm UTC](https://forum.inductiveautomation.com/t/automatic-dependent-dropdown-lists-with-querys/102507/3 "2025-02-18T18:44:55Z")

</div>

thank you very much it worked for me.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d300cd0a1df9297ab179990f17138faff17a1323.png)  
I changed the dropdown to a textfield and it works directly  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/a/7aaf4a2074cd7aa2ba279ca35936309cb6bc0b49.png)  
thanks again

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 18, 2025, 7:02pm UTC](https://forum.inductiveautomation.com/t/automatic-dependent-dropdown-lists-with-querys/102507/4 "2025-02-18T19:02:50Z")

</div>

> [@Jose\_Lopez](#):
>
> I changed the dropdown to a textfield ...

I think you should change it to a label. If you want to keep it a Text Field then set `enabled : false` so the user can't override what the dropdown is setting.

---

<div class="post-metadata">

**Author:** ![Jose\_Lopez](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@Jose\_Lopez](https://forum.inductiveautomation.com/u/Jose_Lopez)\
**Post date:** [February 18, 2025, 9:43pm UTC](https://forum.inductiveautomation.com/t/automatic-dependent-dropdown-lists-with-querys/102507/5 "2025-02-18T21:43:08Z")

</div>

Yes, I just did that, it still works for me to keep it as a text field, thank you very much.
