# Tab strip making just one pulse in the selected tab

**URL:** <https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [September 25, 2023, 2:12pm UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585 "2023-09-25T14:12:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![RENATO\_DUENAS](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/renato_duenas/32/40767_2.png) [@RENATO\_DUENAS](https://forum.inductiveautomation.com/u/RENATO_DUENAS)\
**Post date:** [September 25, 2023, 2:12pm UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/1 "2023-09-25T14:12:51Z")

</div>

I am not sure if there is a chance to assign a null value to the selected Tab of a tab strip, because I want to use the tab Strip as an easy solution. But the problem is that if for any reason I have to click on a button that is not attached to the tab strip for instance 'alarms' and the window changes to alarms windows, the tab strip still selecting the selected Tab in its container. So, this is because the selected Tad property is like a latching value and this is visually annoying. If there is not a way to change this, I would probably have to use one button per window and grouping all of these as a tab strip and that is more time.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 1, 2023, 1:10am UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/2 "2023-10-01T01:10:19Z")

</div>

> [@RENATO\_DUENAS](#):
>
> and the window changes to alarms windows

I want to make sure I understand your problem correctly:  
Your using the tab strip as a docked window, and the alarm button in the docked window is causing the docked window to display the alarms page, while the other window is still displaying the main window that the tab strip opened. Is that correct?

It sounds like the alarm button needs to be reconfigured to open the alarm window in a different way. Perhaps it would look better to close the docked window, and open the alarm window by itself, or perhaps the alarm window should be changed to a popup.

---

<div class="post-metadata">

**Author:** ![RENATO\_DUENAS](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/renato_duenas/32/40767_2.png) [@RENATO\_DUENAS](https://forum.inductiveautomation.com/u/RENATO_DUENAS)\
**Post date:** [October 2, 2023, 3:54am UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/3 "2023-10-02T03:54:00Z")

</div>

> [@justinedwards.jle](#):
>
> er window is still displaying the main window that the tab strip opened. Is that correct?

Thanks for your reply,

Well, the button to call the alarm window is configured correctly and it is in a north docked window. For a particular reason I want this button far from the normal navigation docked window.

So, the tab strip is in south docked window and it contains the normal navigation names, such as overview, trends, users' management, states, and few more things. The fact is that when I choose the alarm button, this one has a script that swap to a main window to see an alarm table, but in the 'tab strip' still seeing selected the overview window. So, I don't know if it is possible to create a script in the tab strip that make all the windows unselected when I select a window that is not part of the tab strip. In fact, I tried but nothing happens.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 2, 2023, 4:48am UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/4 "2023-10-02T04:48:00Z")

</div>

> [@RENATO\_DUENAS](#):
>
> is possible to create a script in the tab strip that make all the windows unselected

The property is called `selectedTab`, and it can be set to `None`, so the script you are looking for will look something like this:

```auto
# Get the window that contains the tab strip
# Correct this window name
tabWindow = system.gui.getWindow('TabStripWindowName')

# Retrieve the tab strip component from the window
# Correct this component path if needed
tabStrip = tabWindow.rootContainer.getComponent('Tab Strip')

# Deselect all tabs by setting the selected tab to null
tabStrip.selectedTab = None

```

It should probably be called from the alarm button when it changes the main window

---

<div class="post-metadata">

**Author:** ![RENATO\_DUENAS](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/renato_duenas/32/40767_2.png) [@RENATO\_DUENAS](https://forum.inductiveautomation.com/u/RENATO_DUENAS)\
**Post date:** [October 2, 2023, 5:12am UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/5 "2023-10-02T05:12:08Z")

</div>

Great dear Justin. That's it the solution. Thank you so much. I was using the wrong syntax, for instance my script was similar but at the end I was using 'null' or 'NULL' instead of 'None'. Hehe. And regarding in what moment to call it, you are right it is better to call it with the alarm button.

---

<div class="post-metadata">

**Author:** ![RENATO\_DUENAS](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/renato_duenas/32/40767_2.png) [@RENATO\_DUENAS](https://forum.inductiveautomation.com/u/RENATO_DUENAS)\
**Post date:** [October 2, 2023, 6:18am UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/6 "2023-10-02T06:18:55Z")

</div>

> [@justinedwards.jle](#):
>
> `tabStrip.selectedTab = None`

it seems it didn't work.  
Let me show you the error:

Traceback (most recent call last):  
File "event:actionPerformed", line 7, in   
java.lang.NullPointerException

java.lang.NullPointerException: java.lang.NullPointerException

```
caused by NullPointerException

```

This is the current script I use:

tabWindow = system.gui.getWindow('Navigation')  
tabStrip = tabWindow.rootContainer.getComponent('Tab Strip')  
tabStrip.selectedTab = None  
window = system.nav.openWindow('Alarms')  
system.nav.centerWindow(window)

Any idea, let me know.

Regards,

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 2, 2023, 7:49am UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/7 "2023-10-02T07:49:20Z")

</div>

Change your script to this, and look at the console output.

```auto
tabWindow = system.gui.getWindow('Navigation')
tabStrip = tabWindow.rootContainer.getComponent('Tab Strip')
print tabWindow
print tabStrip

```

See which one is null, and then troubleshoot the path

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 3, 2023, 9:08pm UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/8 "2023-10-03T21:08:46Z")

</div>

This post I read today seems relevant to what you are wanting to do:

> [@Docked Tab Strip for Navigation with Contextual Go-To Buttons](https://forum.inductiveautomation.com/t/docked-tab-strip-for-navigation-with-contextual-go-to-buttons/79995/2):
>
> Most people bind the tag strip to the current window system tag. As long as all of your main window operations use swapping instead of opening, it should stay in sync. (I can't remember when they went missing, but there were many Vision project templates available that showed how one would typically tie stuff together. Consider spinning up a v7.9 or v8.0 gateway to recover samples of those.)

---

<div class="post-metadata">

**Author:** ![RENATO\_DUENAS](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/renato_duenas/32/40767_2.png) [@RENATO\_DUENAS](https://forum.inductiveautomation.com/u/RENATO_DUENAS)\
**Post date:** [October 14, 2023, 11:37pm UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/9 "2023-10-14T23:37:56Z")

</div>

Thanks for your reply. I have just noticed that it is hard to find the right syntax to make this tab strip works well when I don't want a selected tab for any reason. Anyway, working with a SCADA and now trying to use the Tree view as another option, I have found out that a similar thing happens, but then I tried this code in the expression binding of the selected path of my tree view and the results were great:

```auto
lookup({Root Container.trvNavigation.data}, {[System]Client/User/CurrentWindow},
"", "windowPath", "path") 
+ "/" + 
lookup({Root Container.trvNavigation.data}, {[System]Client/User/CurrentWindow},
"", "windowPath", "text")

```

So, as I have researched the lookup expression function have the following parameters:

`lookup(dataset,lookupValue,noMatchValue,lookupColumn,resultColumn)`

My dataset is the _{Root Container.trvNavigation.data}_.  
I am looking for my _{[System]Client/User/CurrentWindow}_.  
My result _" "_ if there's a nomatch value.  
The column where I should look up the _lookup value_.  
The result is taken from this _result column_ if I find the lookup value.

This expression returns a value bind to the selected path and in this way works great.

Best regards,

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 15, 2023, 6:26am UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/10 "2023-10-15T06:26:17Z")

</div>

> [@Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831):
>
> This thread is intended as a short help file for all those struggling to post formatted code on the forum. Posting formatted code on the forum (and most others) is as simple as selecting the code and pressing the \</\> button. It works the same as applying Bold or Italic styles to your document. It preserves indentation and applies syntax highlighting. [How to post code]

---

<div class="post-metadata">

**Author:** ![RENATO\_DUENAS](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/renato_duenas/32/40767_2.png) [@RENATO\_DUENAS](https://forum.inductiveautomation.com/u/RENATO_DUENAS)\
**Post date:** [October 15, 2023, 3:20pm UTC](https://forum.inductiveautomation.com/t/tab-strip-making-just-one-pulse-in-the-selected-tab/79585/11 "2023-10-15T15:20:16Z")

</div>

Thanks for this tip, It was useful. I apologizes if I didn't use it before. I am new at the forum.
