# Two Tier Navigation Default Tab

**URL:** <https://forum.inductiveautomation.com/t/two-tier-navigation-default-tab/32642>\
**Category:** Ignition\
**Created:** [February 26, 2020, 9:28pm UTC](https://forum.inductiveautomation.com/t/two-tier-navigation-default-tab/32642 "2020-02-26T21:28:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan123](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@dan123](https://forum.inductiveautomation.com/u/dan123)\
**Post date:** [February 26, 2020, 9:28pm UTC](https://forum.inductiveautomation.com/t/two-tier-navigation-default-tab/32642/1 "2020-02-26T21:28:35Z")

</div>

I have a two tier navigation strip and I put a line in the internalFrameOpened event to set the default tab (`system.gui.getParentWindow(event).getComponentForPath('Root Container.Window Groups').selectedTab = "Overview"`) – so that when a client is closed and re-opened, it shows the tab that corresponds to the startup main window. If I don’t have this line, then a user could be on a different screen, close the window, and when they open the client again, it shows the ‘Overview’ window, but the selected tabs are whatever they had opened when they closed the client.

The issue is that I also have a login pop-up that uses the ‘switchUser’ function – which closes and re-opens the windows, and in doing so, causes the internalFrameOpened event to fire, setting the tab back to ‘Overview’ which I do not want.

So, I’d like to find a way to either not close/re-open the navigation window when the user is changed OR have the correct tab selected on client restart without using the ‘internalFrameOpened’ event.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [February 26, 2020, 9:47pm UTC](https://forum.inductiveautomation.com/t/two-tier-navigation-default-tab/32642/2 "2020-02-26T21:47:07Z")

</div>

Setting the property in the client startup script instead of the internalFrameActivated should do what you want. Since that won’t fire the second time.

---

<div class="post-metadata">

**Author:** ![dan123](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@dan123](https://forum.inductiveautomation.com/u/dan123)\
**Post date:** [February 27, 2020, 6:24pm UTC](https://forum.inductiveautomation.com/t/two-tier-navigation-default-tab/32642/3 "2020-02-27T18:24:53Z")

</div>

That doesn’t work because the client startup script fires before the window opens.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [February 27, 2020, 8:12pm UTC](https://forum.inductiveautomation.com/t/two-tier-navigation-default-tab/32642/4 "2020-02-27T20:12:18Z")

</div>

Use a client tag and then write to it from the client startup script and from the script you use to switch users.

---

<div class="post-metadata">

**Author:** ![dan123](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@dan123](https://forum.inductiveautomation.com/u/dan123)\
**Post date:** [February 28, 2020, 1:46pm UTC](https://forum.inductiveautomation.com/t/two-tier-navigation-default-tab/32642/5 "2020-02-28T13:46:37Z")

</div>

I was able to make it work using that – it was a little weird since I have a default view only user so I had to mess with the setConnectionMode to get it working. Thanks!
