# Dashboard widgets inside subflows

**URL:** <https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595>\
**Category:** Dashboard\
**Created:** [4 February 2019 23:31 UTC](https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595 "2019-02-04T23:31:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [4 February 2019 23:31 UTC](https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595/1 "2019-02-04T23:31:22Z")

</div>

The general question is whether ui widgets can work properly inside subflows. In particular, I want to use a `ui_switch` node in a subflow. Each subflow instance produces a widget in the dashboard that operates independently, but they do not appear in the order I want. The dashboard tab in the editor shows only one node, so I don't see an obvious way to re-arrange the dashboard widgets. Is there a workaround? What determines the order in which the widgets appear? Should I look for a different way to clean up my flows?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [4 February 2019 23:45 UTC](https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595/2 "2019-02-04T23:45:19Z")

</div>

Correct - you cannot use dashboard widgets inside subflows for exactly the layout reason you identify. The sidebar that controls the layout order knows nothing about subflows so there is no current workaround.

---

<div class="post-metadata">

**Author:** ![SergiuToporjinschi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sergiutoporjinschi/32/36263_2.png) [@SergiuToporjinschi](https://discourse.nodered.org/u/SergiuToporjinschi)\
**Post date:** [13 July 2019 20:11 UTC](https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595/3 "2019-07-13T20:11:02Z")

</div>

I have the same problem, would be nice to have this working... the flows could be simplified a lot.  
Maybe is a good idea if every widget is prefixed with the name of the sub-flow this way we can order them in right panel.  
If this is not possible, at least to draw them in order, like drawing all with gets from each sub-flow and then get the next sub-flow and so on...

---

<div class="post-metadata">

**Author:** ![SergiuToporjinschi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sergiutoporjinschi/32/36263_2.png) [@SergiuToporjinschi](https://discourse.nodered.org/u/SergiuToporjinschi)\
**Post date:** [13 July 2019 20:12 UTC](https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595/4 "2019-07-13T20:12:44Z")

</div>

Another solution would be to offer the possibility to set the group from an environment parameter.  
This way we can set the group on the sub-flow and take the group from there

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [13 July 2019 21:18 UTC](https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595/5 "2019-07-13T21:18:05Z")

</div>

My "work around" is to have the dashboard items send their messages with a very specific `TOPIC`.

Then in the sub-flow, I route those messages to the dashobard node.

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [15 July 2019 17:13 UTC](https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595/6 "2019-07-15T17:13:11Z")

</div>

I may be missing something, but I don't see how any of these suggestions resolves or works around the issue I described. The dashboard clearly knows about the distinct widgets inside each subflow instance, but the sidebar tab does not and so cannot arrange them properly. Changes would be needed in the editor to fix this. BTW, does anyone know whether the new (beta) [dashboard layout editor](https://discourse.nodered.org/t/something-for-friday-afternoon-dashboard-layout-editor/12957) does anything different. (The only machine I have running the beta is down right now.)

---

<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:** [15 July 2019 17:49 UTC](https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595/7 "2019-07-15T17:49:44Z")

</div>

The layout editor doesn't change the (lack of) support for dashboard widgets in a subflow.

... but it is in the plan. Can't say when as I don't know when we'll get to work on it, but it has been discussed in some detail.

---

<div class="post-metadata">

**Author:** ![nosaj66au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nosaj66au/32/5171_2.png) [@nosaj66au](https://discourse.nodered.org/u/nosaj66au)\
**Post date:** [19 February 2020 01:23 UTC](https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595/8 "2020-02-19T01:23:18Z")

</div>

Hi Nick,  
Any word on this, before I start coding something custom?  
Jason

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [19 February 2020 07:09 UTC](https://discourse.nodered.org/t/dashboard-widgets-inside-subflows/7595/9 "2020-02-19T07:09:32Z")

</div>

Well, there is pull request for a _design note_ now, which - if implemented - would introduce reusable Dashboard components. That would really be a killer feature for the Dashboard. 😀

> <https://github.com/node-red/designs/pull/24>
