# Dropdown list cambiar de ventanas

**URL:** <https://forum.inductiveautomation.com/t/dropdown-list-cambiar-de-ventanas/104891>\
**Category:** General Discussion\
**Tags:** vision\
**Created:** [April 9, 2025, 12:12pm UTC](https://forum.inductiveautomation.com/t/dropdown-list-cambiar-de-ventanas/104891 "2025-04-09T12:12:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro\_Padilla](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@Alejandro\_Padilla](https://forum.inductiveautomation.com/u/Alejandro_Padilla)\
**Post date:** [April 9, 2025, 12:12pm UTC](https://forum.inductiveautomation.com/t/dropdown-list-cambiar-de-ventanas/104891/1 "2025-04-09T12:12:57Z")

</div>

Hola a todos, A lo mejor es muy básico lo que voy a preguntar pero me considero un aprendiz en Ignition.  
Mi pregunta es, como puedo cambiar de ventanas o popup con el dropdown list de Vision?  
De antemano muchas gracias.

---

<div class="post-metadata">

**Author:** ![hiram.gonzalez](https://avatars.discourse-cdn.com/v4/letter/h/d2c977/32.png) [@hiram.gonzalez](https://forum.inductiveautomation.com/u/hiram.gonzalez)\
**Post date:** [April 9, 2025, 2:57pm UTC](https://forum.inductiveautomation.com/t/dropdown-list-cambiar-de-ventanas/104891/2 "2025-04-09T14:57:40Z")

</div>

Hi Alejandro,

There are many ways you can do that, there are other components in the palette specifically designed for navigating between windows; However, using a dropdown is a valid alternative, but you'll need to add scripting to it, I share with you one way you can do it:

1- Define the Dropdown component 'Data' property with 'Values' ​​of 0, 1, etc., and 'Labels' with the names of the windows you want the user to see, e.g. 'Window #0', 'Window #1'....

2- Add Scripting to the Dropdow propertyChange event (You can simplify the code to make it cleaner, but I'll leave it that way to make it clearer):

```python
  ##Only when selectedValue property changes
  if event.propertyName == "selectedValue":
   ##Only when new selectedValue value is different that the old one
   if event.newValue != event.oldValue:
   ##If dropdown Value is 0, open window 'window_0'
   if event.source.selectedValue == 0:
     window = system.nav.openWindow('window_0')
     system.nav.centerWindow(window)
   ##If dropdown Value is 1, open window 'window_1'
   elif event.source.selectedValue == 1:
     window = system.nav.openWindow('window_1')
     system.nav.centerWindow(window)

```

As additional suggestions, I recommend that you review Inductive University, it has many useful topics and will help your Ignition adventure and give you stronger foundations.  
I would also suggest posting in English when possible, Ignition is a widely used platform primarily in the US so posting in English helps to get more responses or get to more people who can contribute.

I hope this has been helpful, Ignition is a great platform, I hope you enjoy using it.  
Good luck.

---

<div class="post-metadata">

**Author:** ![Alejandro\_Padilla](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@Alejandro\_Padilla](https://forum.inductiveautomation.com/u/Alejandro_Padilla)\
**Post date:** [April 24, 2025, 7:46pm UTC](https://forum.inductiveautomation.com/t/dropdown-list-cambiar-de-ventanas/104891/3 "2025-04-24T19:46:46Z")

</div>

I copied and pasted the script, then entered the names of the two windows I currently have, and it threw up the following error. I should mention I'm quite familiar with this language. Thanks.

 ![ERROR](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8b34f29bba2ad6e6cb2cc208c6b8c2735c6a063c.jpeg)  
 ![WINDOWS](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/35247db1bb01fcb7a3abe0ef644665520ebf4e89.jpeg)

---

<div class="post-metadata">

**Author:** ![Alejandro\_Padilla](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@Alejandro\_Padilla](https://forum.inductiveautomation.com/u/Alejandro_Padilla)\
**Post date:** [April 24, 2025, 7:47pm UTC](https://forum.inductiveautomation.com/t/dropdown-list-cambiar-de-ventanas/104891/4 "2025-04-24T19:47:46Z")

</div>

I mean the programming language.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Furlani](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/benjamin_furlani/32/66084_2.png) [@Benjamin\_Furlani](https://forum.inductiveautomation.com/u/Benjamin_Furlani)\
**Post date:** [April 24, 2025, 7:49pm UTC](https://forum.inductiveautomation.com/t/dropdown-list-cambiar-de-ventanas/104891/5 "2025-04-24T19:49:59Z")

</div>

Just at first glance your code it tabbed over at the beginning so that automatically will cause an issue.

Also:  
Please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).
