# A way to retrieve the dashboard tab and group from within a flow?

**URL:** <https://discourse.nodered.org/t/a-way-to-retrieve-the-dashboard-tab-and-group-from-within-a-flow/63227>\
**Category:** General\
**Tags:** node-red-dashboard\
**Created:** [30 May 2022 02:55 UTC](https://discourse.nodered.org/t/a-way-to-retrieve-the-dashboard-tab-and-group-from-within-a-flow/63227 "2022-05-30T02:55:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [30 May 2022 02:55 UTC](https://discourse.nodered.org/t/a-way-to-retrieve-the-dashboard-tab-and-group-from-within-a-flow/63227/1 "2022-05-30T02:55:46Z")

</div>

A way to retrieve the dashboard tab and group from within a flow? In various development APIs there are reflective or inspection methods for doing this type of thing, so wonder if something similar in NR?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [30 May 2022 05:19 UTC](https://discourse.nodered.org/t/a-way-to-retrieve-the-dashboard-tab-and-group-from-within-a-flow/63227/2 "2022-05-30T05:19:31Z")

</div>

I am not entirely sure what you are looking for, but the `ui control` node reports dashboard interactions (ie. like changing tabs)

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [30 May 2022 14:19 UTC](https://discourse.nodered.org/t/a-way-to-retrieve-the-dashboard-tab-and-group-from-within-a-flow/63227/3 "2022-05-30T14:19:21Z")

</div>

Idea was or is that I could grab the tab/group name, and label controls, UI elements with the same name as desired. So if the group was 'Me' I could setup a button that was labeled 'Button Me' without resorting to static text or using a context variable even. This would make the flow modular in that any place I imported that flow would adapt to the tab or group name accordingly. I have a use case where the same flow maybe 5 or 10 instances running, all independent of each other where the key difference is the location of the given instance, say tab "one" versus "two". Like I said, it was just an idea, potential way to address how make something dynamic versus static.

---

<div class="post-metadata">

**Author:** ![mickym2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mickym2/32/36128_2.png) [@mickym2](https://discourse.nodered.org/u/mickym2)\
**Post date:** [30 May 2022 14:24 UTC](https://discourse.nodered.org/t/a-way-to-retrieve-the-dashboard-tab-and-group-from-within-a-flow/63227/4 "2022-05-30T14:24:29Z")

</div>

Use the ui\_control node. If tab changes you get the name of the active tab in addition to the browser instance.

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [30 May 2022 14:29 UTC](https://discourse.nodered.org/t/a-way-to-retrieve-the-dashboard-tab-and-group-from-within-a-flow/63227/5 "2022-05-30T14:29:18Z")

</div>

Ah, that works for tabs, is there similar for groups? Just asking.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [30 May 2022 16:33 UTC](https://discourse.nodered.org/t/a-way-to-retrieve-the-dashboard-tab-and-group-from-within-a-flow/63227/6 "2022-05-30T16:33:38Z")

</div>

read the documentation of the node:

> When any browser client connects or loses connection, changes tab, or expands or collapses a group this node will emit a `msg` containing:
> 
> - `payload` - _connect_ , _lost_ , _change_ , or _group_ .
> - `socketid` - the ID of the socket (this will change every time the browser reloads the page).
> - `socketip` - the ip address from where the connection originated.
> - `tab` - the number of the tab. (only for 'change' event).
> - `name` - the name of the tab. (only for 'change' event).
> - `group` - the name of the group. (only for 'group' event).
> - `open` - the state of the group. (only for 'group' event).  
> Optional - report only connect events - useful to use to trigger a resend of data to a new client without needing to filter out other events.

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [30 May 2022 18:18 UTC](https://discourse.nodered.org/t/a-way-to-retrieve-the-dashboard-tab-and-group-from-within-a-flow/63227/7 "2022-05-30T18:18:17Z")

</div>

Read? Documentation? What a radical concept! Point Taken.

---

<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:** [13 June 2022 18:19 UTC](https://discourse.nodered.org/t/a-way-to-retrieve-the-dashboard-tab-and-group-from-within-a-flow/63227/8 "2022-06-13T18:19:02Z")

</div>

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