# How can I change the flow view in javascript?

**URL:** https://discourse.nodered.org/t/how-can-i-change-the-flow-view-in-javascript/63880
**Category:** General
**Created:** [13 June 2022 21:52 UTC](https://discourse.nodered.org/t/how-can-i-change-the-flow-view-in-javascript/63880 "2022-06-13T21:52:12Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![HuOliveiraWork](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/huoliveirawork/32/62521_2.png) [@HuOliveiraWork](https://discourse.nodered.org/u/HuOliveiraWork)
#### Post date: [13 June 2022 21:52 UTC](https://discourse.nodered.org/t/how-can-i-change-the-flow-view-in-javascript/63880/1 "2022-06-13T21:52:12Z")

</div>

Hi everybody!

I'm configuring some data in 2 different flows, and my goal is to change my flow when the user clicks in a button, is it possible to do that inside a function?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [14 June 2022 01:25 UTC](https://discourse.nodered.org/t/how-can-i-change-the-flow-view-in-javascript/63880/2 "2022-06-14T01:25:32Z")

</div>

I would imagine so.

---

<div class="post-metadata">

### Author: ![HuOliveiraWork](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/huoliveirawork/32/62521_2.png) [@HuOliveiraWork](https://discourse.nodered.org/u/HuOliveiraWork)
#### Post date: [14 June 2022 15:38 UTC](https://discourse.nodered.org/t/how-can-i-change-the-flow-view-in-javascript/63880/3 "2022-06-14T15:38:12Z")

</div>

I apologize, my question was not understandable or is it not possible to change the flow?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [14 June 2022 15:43 UTC](https://discourse.nodered.org/t/how-can-i-change-the-flow-view-in-javascript/63880/4 "2022-06-14T15:43:48Z")

</div>

what do you mean by "change the flow"

---

<div class="post-metadata">

### Author: ![HuOliveiraWork](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/huoliveirawork/32/62521_2.png) [@HuOliveiraWork](https://discourse.nodered.org/u/HuOliveiraWork)
#### Post date: [14 June 2022 16:10 UTC](https://discourse.nodered.org/t/how-can-i-change-the-flow-view-in-javascript/63880/5 "2022-06-14T16:10:54Z")

</div>

I want to change my user's view to another flow without him having to go to the navbar to select

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [14 June 2022 16:21 UTC](https://discourse.nodered.org/t/how-can-i-change-the-flow-view-in-javascript/63880/6 "2022-06-14T16:21:15Z")

</div>

> [@HuOliveiraWork](#):
>
> I want to change my user's view to another flow without him having to go to the navbar to selec

Just to clarify - do you mean in the Node-RED **editor** (where users create their flows), you want to be able to change the tab being shown?

Or is this related to Node-RED Dashboard?

> [@HuOliveiraWork](#):
>
> hen the user clicks in a button, is it possible to do that inside a function?

Where is that button shown? Is it part of a flow? Or some custom UI element you are adding to the editor?

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [15 June 2022 01:21 UTC](https://discourse.nodered.org/t/how-can-i-change-the-flow-view-in-javascript/63880/7 "2022-06-15T01:21:03Z")

</div>

If you do mean the dashboard then all you need to do is use the ui-control node and send the name of the "TAB" you want to switch to.

So if using a button, set the button payload to the name of the tab you want, and feed that into the ui-control node.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/30fcaf9f9021dc5f8ea72e5a04dade4313c133ef.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: [29 June 2022 01:21 UTC](https://discourse.nodered.org/t/how-can-i-change-the-flow-view-in-javascript/63880/8 "2022-06-29T01:21:35Z")

</div>

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