# system.nav.swapWindow()

**URL:** <https://forum.inductiveautomation.com/t/system-nav-swapwindow/35231>\
**Category:** Ignition\
**Tags:** ignition78, ignition79, vision, scripting\
**Created:** [June 1, 2020, 9:17pm UTC](https://forum.inductiveautomation.com/t/system-nav-swapwindow/35231 "2020-06-01T21:17:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dturner](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dturner](https://forum.inductiveautomation.com/u/dturner)\
**Post date:** [June 1, 2020, 9:17pm UTC](https://forum.inductiveautomation.com/t/system-nav-swapwindow/35231/1 "2020-06-01T21:17:32Z")

</div>

Can a system.nav.swapWindow function be used in a Gateway Tag Change Script? When I try to use the function, I get an error stating "object has no attribute ‘nav’ ". What I am trying to do is to change from one main window to another main window every 20 seconds for the first 15 minutes of the shift for 22 Televisions. So basically flashing a message every 20 seconds. The PLC checks the time and toggles a bit on and off every 20 seconds. I thought I could use either system.nav.swapWindow or system.nav.swapTO functions to do this. Do I need to try a different method to accomplish my task?

 ![toggle](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/4f0b88ef074443f297406a47dbdd8c7c808d0f82.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 1, 2020, 10:46pm UTC](https://forum.inductiveautomation.com/t/system-nav-swapwindow/35231/2 "2020-06-01T22:46:46Z")

</div>

Gateway events run in the gateway (the background service in that machine), and therefore have no windows at all. That’s why there’s no .nav collection of script functions. However, you can set up a _client_ tag change script in that project that can do what you require.

---

<div class="post-metadata">

**Author:** ![dturner](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dturner](https://forum.inductiveautomation.com/u/dturner)\
**Post date:** [June 2, 2020, 4:44pm UTC](https://forum.inductiveautomation.com/t/system-nav-swapwindow/35231/3 "2020-06-02T16:44:31Z")

</div>

Thank you! I changed everything over to a client tag change script and it works well.
