# How to go into different windows using dropdown list?

**URL:** <https://forum.inductiveautomation.com/t/how-to-go-into-different-windows-using-dropdown-list/4326>\
**Category:** Ignition\
**Created:** [April 20, 2012, 7:01am UTC](https://forum.inductiveautomation.com/t/how-to-go-into-different-windows-using-dropdown-list/4326 "2012-04-20T07:01:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramkumar\_S](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@Ramkumar\_S](https://forum.inductiveautomation.com/u/Ramkumar_S)\
**Post date:** [April 20, 2012, 7:01am UTC](https://forum.inductiveautomation.com/t/how-to-go-into-different-windows-using-dropdown-list/4326/1 "2012-04-20T07:01:59Z")

</div>

Hello,

I want to know how to use the drop down list. Is it possible to go to another window using the drop down list instead of using the buttons?

For example, I have two windows for Trends namely Trend 1 and Trend 2. I made two columns, both for string.

Col1 Col2  
Trend 1 Trend 1  
Trend 2 Trend 2

Col1 for the windows to open and Col2 is the display name. Now by selecting Trend 1 in the dropdown list, can I open the Trend 1 window? Please tell me how to do this?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [April 20, 2012, 3:31pm UTC](https://forum.inductiveautomation.com/t/how-to-go-into-different-windows-using-dropdown-list/4326/2 "2012-04-20T15:31:56Z")

</div>

All you need to do is add a propertyChange event to the dropdown list that opens a window when the user selects a different option. Add the following script to the propertyChange event handler:`if event.propertyName == "selectedStringValue":
    value = event.newValue
    if value != "":
        system.nav.openWindow(value)`You can use the following to swap:`if event.propertyName == "selectedStringValue":
    value = event.newValue
    if value != "":
        system.nav.swapTo(value)`If you get any errors post the full details of the error.

---

<div class="post-metadata">

**Author:** ![Ramkumar\_S](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@Ramkumar\_S](https://forum.inductiveautomation.com/u/Ramkumar_S)\
**Post date:** [April 24, 2012, 5:27am UTC](https://forum.inductiveautomation.com/t/how-to-go-into-different-windows-using-dropdown-list/4326/3 "2012-04-24T05:27:55Z")

</div>

Thanks a lot Travis, it works fine now.

---

<div class="post-metadata">

**Author:** ![roizundak](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/roizundak/32/4430_2.png) [@roizundak](https://forum.inductiveautomation.com/u/roizundak)\
**Post date:** [April 22, 2018, 8:50am UTC](https://forum.inductiveautomation.com/t/how-to-go-into-different-windows-using-dropdown-list/4326/4 "2018-04-22T08:50:21Z")

</div>

There is a problem with this script.  
If I have several windows to select and i selected one of them before and then i returned to specific option again there is no new Value because it selected before.  
How can I initialize selectedStringValue after clicked on it?

---

<div class="post-metadata">

**Author:** ![roizundak](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/roizundak/32/4430_2.png) [@roizundak](https://forum.inductiveautomation.com/u/roizundak)\
**Post date:** [April 22, 2018, 9:03am UTC](https://forum.inductiveautomation.com/t/how-to-go-into-different-windows-using-dropdown-list/4326/5 "2018-04-22T09:03:33Z")

</div>

I figured out, after selected I just put 0 inside selectedValue.

---

<div class="post-metadata">

**Author:** ![aaron1](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@aaron1](https://forum.inductiveautomation.com/u/aaron1)\
**Post date:** [November 12, 2019, 6:31am UTC](https://forum.inductiveautomation.com/t/how-to-go-into-different-windows-using-dropdown-list/4326/6 "2019-11-12T06:31:05Z")

</div>

Hello,

I am using this method to opening up windows. It works however I keep getting the following error message:

Traceback (most recent call last):  
File “event:propertyChange”, line 8, in   
ValueError: Window does not exist.

```
at org.python.core.Py.ValueError(Py.java:309)
at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities$5.run(NavUtilities.java:431)
at com.inductiveautomation.factorypmi.application.script.builtin.WindowUtilities.doGUIAction(WindowUtilities.java:810)
at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.openWindowImpl(NavUtilities.java:359)
at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.openWindow(NavUtilities.java:349)
at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilitiesDispatcher.openWindow(NavUtilitiesDispatcher.java:143)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:186)
at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. __call__ (ScriptManager.java:431)
at org.python.core.PyObject. __call__ (PyObject.java:387)
at org.python.core.PyObject. __call__ (PyObject.java:391)
at org.python.pycode._pyx0.f$0(<event:propertyChange>:13)
at org.python.pycode._pyx0.call_function(<event:propertyChange>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1275)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:636)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:180)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.access$000(ActionAdapter.java:40)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter$ActionRunner.run(ActionAdapter.java:286)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

```

Ignition v7.9.12 (b2019070213)  
Java: Oracle Corporation 1.8.0\_191

What is it complaining when it works? How can I get rid of this message?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![aaron1](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@aaron1](https://forum.inductiveautomation.com/u/aaron1)\
**Post date:** [November 12, 2019, 6:37am UTC](https://forum.inductiveautomation.com/t/how-to-go-into-different-windows-using-dropdown-list/4326/7 "2019-11-12T06:37:34Z")

</div>

Never mind…it looks like you have to have the if condition for event.newValue != “” in there!
