# Reference to a closed window

**URL:** <https://forum.inductiveautomation.com/t/reference-to-a-closed-window/31402>\
**Category:** Ignition\
**Tags:** ignition78, ignition79, ignition80, vision, scripting\
**Created:** [January 20, 2020, 9:51am UTC](https://forum.inductiveautomation.com/t/reference-to-a-closed-window/31402 "2020-01-20T09:51:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![giulio.comito](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/giulio.comito/32/12671_2.png) [@giulio.comito](https://forum.inductiveautomation.com/u/giulio.comito)\
**Post date:** [January 20, 2020, 9:51am UTC](https://forum.inductiveautomation.com/t/reference-to-a-closed-window/31402/1 "2020-01-20T09:51:29Z")

</div>

Hello everyone! I write this post because I would like to receive your opinion.  
I would like to know how I can correct this error:  
 ![Cattura](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/31737c69044a94906482bea187251143ee278a84.png).  
Basically I neet to call a window inside a script, but I should do it even if it is closed.  
Is there a way to open it and hide it from view during preview mode?  
Thank you all!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 21, 2020, 4:23pm UTC](https://forum.inductiveautomation.com/t/reference-to-a-closed-window/31402/2 "2020-01-21T16:23:57Z")

</div>

What function are you using to actually open the window? If your windows are properly designated ‘main’ windows, then [`system.nav.openWindow()`](https://docs.inductiveautomation.com/display/DOC80/system.nav.openWindow) should re-focus an existing _or_ open a new instance appropriately. That said, opening new window instances in the designer isn’t the recommended way to test - the designer, even in runtime mode, doesn’t do everything that a ‘real’ client does perfectly - so I would recommend that you launch a separate client and test within that.

---

<div class="post-metadata">

**Author:** ![giulio.comito](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/giulio.comito/32/12671_2.png) [@giulio.comito](https://forum.inductiveautomation.com/u/giulio.comito)\
**Post date:** [January 22, 2020, 7:48am UTC](https://forum.inductiveautomation.com/t/reference-to-a-closed-window/31402/3 "2020-01-22T07:48:44Z")

</div>

At the moment I use “getWindow = system.gui.getWindow(‘Window’)” and then I insert the result obtained inside a JFrame.  
This is a Power Table:

 ![1](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/d9de6157b520c2ce4c744e8c77c712b1ee13a405.png)  
and this is what happens when you click on a row:  
 ![2](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b52482313fadd6db56a5b6f2d423455ba1b818d8.png).  
In practice I open a window (inside the JFrame) which contains a table; in this way I got a result similar to the famous SubView Row property.  
The problem is that I can’t open the SubView if the window itself isn’t open!
