# Change the content of a tab with variable

**URL:** <https://discourse.nodered.org/t/change-the-content-of-a-tab-with-variable/48397>\
**Category:** Dashboard\
**Created:** [14 July 2021 09:12 UTC](https://discourse.nodered.org/t/change-the-content-of-a-tab-with-variable/48397 "2021-07-14T09:12:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![federico.barenghi](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@federico.barenghi](https://discourse.nodered.org/u/federico.barenghi)\
**Post date:** [14 July 2021 09:12 UTC](https://discourse.nodered.org/t/change-the-content-of-a-tab-with-variable/48397/1 "2021-07-14T09:12:52Z")

</div>

Hi,

I'm very new to node-red. I'm trying to change the content of a tab, based on different button clicked in another tab. Is it possible?

Thanks

Federico

---

<div class="post-metadata">

**Author:** ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)\
**Post date:** [14 July 2021 09:26 UTC](https://discourse.nodered.org/t/change-the-content-of-a-tab-with-variable/48397/2 "2021-07-14T09:26:42Z")

</div>

Hello and welcome to the forum.

A bit more details on what/why you want to do and what you have so far/already tried would go a long way to helping us help you.

PS, assuming you are referring to a Tab within a dashboard Group (or is it the other way around?) Confusing it can be 😛

---

<div class="post-metadata">

**Author:** ![federico.barenghi](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@federico.barenghi](https://discourse.nodered.org/u/federico.barenghi)\
**Post date:** [14 July 2021 09:36 UTC](https://discourse.nodered.org/t/change-the-content-of-a-tab-with-variable/48397/3 "2021-07-14T09:36:34Z")

</div>

Hi Gunner,

Thank you for the response and sorry I gave you a few details.  
Yes, I'm referring to a Tab within a dashboard Group.  
I have a page with some machine. I would like to press one machine to go in the tab with the details of the selected machine. So i have to exec a different query in the same tab, based on the selected machine.

---

<div class="post-metadata">

**Author:** ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)\
**Post date:** [14 July 2021 09:39 UTC](https://discourse.nodered.org/t/change-the-content-of-a-tab-with-variable/48397/4 "2021-07-14T09:39:08Z")

</div>

Opps... I think I am no clearer then before 😊

Perhaps post a screenshot and possible exported Flow (format it with the \</\> icon in the post editor) of what you have.

---

<div class="post-metadata">

**Author:** ![federico.barenghi](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@federico.barenghi](https://discourse.nodered.org/u/federico.barenghi)\
**Post date:** [14 July 2021 10:02 UTC](https://discourse.nodered.org/t/change-the-content-of-a-tab-with-variable/48397/5 "2021-07-14T10:02:10Z")

</div>

![Cattura](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/5/95516abefa2cc56a47a7dca16a764ebd7c32e664.png)  
Right now i click on the text ( Linea 1 or Linea2 ecc..) and change the tab. But when i change the tab i would like to pass a variable to know wich Linea i have clicked, to populate the landing tab with the data from a query.  
I can't export the flow because the database doesn't work outside my network unfortunatly

---

<div class="post-metadata">

**Author:** ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)\
**Post date:** [14 July 2021 20:33 UTC](https://discourse.nodered.org/t/change-the-content-of-a-tab-with-variable/48397/6 "2021-07-14T20:33:48Z")

</div>

I might have to pass on this... that redacted image doesn't help much except to indicate some form of dashboard layout.

> [@federico.barenghi](#):
>
> i would like to pass a variable to know wich Linea i have clicked

Each node has an ID... I don't have an example, but perhaps you can track the `msg.payload` flow using the node's ID and code in a function node.

Select a node and see the ID here:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/c/6cc29552dc093026323d9b8a03d2748b0d3ece1c.png) ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/8/381b25f33544ffa0175afc68b76ef1dc075d2268.png)

I have used such (different node) to process a node specific command:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/8/880820791edc2d0d32b2a3c189674d227c712cfe.png)

So should be possible to incorporate some tracking.

---

<div class="post-metadata">

**Author:** ![federico.barenghi](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@federico.barenghi](https://discourse.nodered.org/u/federico.barenghi)\
**Post date:** [16 July 2021 10:11 UTC](https://discourse.nodered.org/t/change-the-content-of-a-tab-with-variable/48397/7 "2021-07-16T10:11:48Z")

</div>

Thanks for the support. This help me a lot.

> [@Gunner](#):
>
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/8/880820791edc2d0d32b2a3c189674d227c712cfe.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 July 2021 10:12 UTC](https://discourse.nodered.org/t/change-the-content-of-a-tab-with-variable/48397/8 "2021-07-30T10:12:39Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
