# Trigger flow when dashboard tab displayed?

**URL:** <https://discourse.nodered.org/t/trigger-flow-when-dashboard-tab-displayed/84588>\
**Category:** General\
**Created:** [16 January 2024 04:33 UTC](https://discourse.nodered.org/t/trigger-flow-when-dashboard-tab-displayed/84588 "2024-01-16T04:33:24Z")\
**Posts on this page:** 5\
**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:** [16 January 2024 04:33 UTC](https://discourse.nodered.org/t/trigger-flow-when-dashboard-tab-displayed/84588/1 "2024-01-16T04:33:24Z")

</div>

Trigger flow when dashboard tab displayed? I recall doing this when I first started learning NR... but for the life of me, I can't seem to find my old flow where I used this technique. And, can't seem to find the forum topic on same.

I recall it was based on a ui\_control node, and used a global context variable to track the 'state' of the dashboard, but other than that? Lost to time.

I have a table that I need to select a specific row when the table is displayed again/dashboard opened to same tab/table. Selecting the correct row I remember/know how to do, but how to get the 'message' to trigger said logic?

---

<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:** [16 January 2024 04:44 UTC](https://discourse.nodered.org/t/trigger-flow-when-dashboard-tab-displayed/84588/2 "2024-01-16T04:44:41Z")

</div>

Now I remember the detail... I don't recall...getting the name of the tab dynamically rather than as a static string? The ui\_control sends the tab name fine, but I want my flow to 'learn' the tab it is on, so I avoid the static string.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 January 2024 09:47 UTC](https://discourse.nodered.org/t/trigger-flow-when-dashboard-tab-displayed/84588/3 "2024-01-16T09:47:44Z")

</div>

> [@Nodi.Rubrum](#):
>
> The ui\_control sends the tab name fine, but I want my flow to 'learn' the tab it is on, so I avoid the static string.

I don't understand what you mean, but don't forget that there may be multiple clients and/or browser tabs connected, so the flow may be on multiple dashboard tabs at the same time, with different clients.

---

<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:** [17 January 2024 15:52 UTC](https://discourse.nodered.org/t/trigger-flow-when-dashboard-tab-displayed/84588/4 "2024-01-17T15:52:43Z")

</div>

Yup... I just set up a switch with all the possible tab names, I need to watch... and then take action as applicable when the given tab name comes via given event, change, lost, connect, etc. The UI view is shared across all clients, in that all clients should see the same status/state of the UI, so I don't have to track individual clients/session in this case.

---

<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:** [31 January 2024 15:53 UTC](https://discourse.nodered.org/t/trigger-flow-when-dashboard-tab-displayed/84588/5 "2024-01-31T15:53:43Z")

</div>

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