# Assign UI Widgets to Tab and Group dynamically in Subflow

**URL:** https://discourse.nodered.org/t/assign-ui-widgets-to-tab-and-group-dynamically-in-subflow/27423
**Category:** Dashboard
**Created:** [28 May 2020 10:12 UTC](https://discourse.nodered.org/t/assign-ui-widgets-to-tab-and-group-dynamically-in-subflow/27423 "2020-05-28T10:12:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![thomas](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@thomas](https://discourse.nodered.org/u/thomas)
#### Post date: [28 May 2020 10:12 UTC](https://discourse.nodered.org/t/assign-ui-widgets-to-tab-and-group-dynamically-in-subflow/27423/1 "2020-05-28T10:12:41Z")

</div>

Hello everyone,

I am currently working on a flow which analyses data from a machine and shows the result on a dashboard.  
To make this project scalable for multiple machines my idea is to put the flow in a subflow which can be easily reused. I would like to avoid copying the code and assign the widgets by hand ever time.

The problem is that I don't see any possibility to assign the UI widgets to different Tabs and Groups dynamically. The Best case would be that I can define the Group/Tab by a msg.payload.tab or something.

Is there any way I missed out?

Thank you in advance.

Thomas

---

<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: [28 May 2020 14:14 UTC](https://discourse.nodered.org/t/assign-ui-widgets-to-tab-and-group-dynamically-in-subflow/27423/2 "2020-05-28T14:14:48Z")

</div>

No, you are correct, it is not currently possible,  
When you get to this level of sophistication you may want to look at he node-red-contrib-uibuilder node that allows you much greater flexibility of dashboard as you can bring whatever framework you like to work with it, albeit at the cost that you have to build it yourself.

---

<div class="post-metadata">

### Author: ![PaulKeates1](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@PaulKeates1](https://discourse.nodered.org/u/PaulKeates1)
#### Post date: [28 May 2020 16:56 UTC](https://discourse.nodered.org/t/assign-ui-widgets-to-tab-and-group-dynamically-in-subflow/27423/3 "2020-05-28T16:56:10Z")

</div>

Hi,

I build a pretty large dashboard with all the Tabs / Groups / Widgets in it. Then in subflows I hide / show & enable / disable the tabs to give the appearance of a dynamic dashboard. Use the ui\_control node to do that. Works really well. Multiple copies of a subflow of course 'collide' as they both want to talk to the same set of widgets. So it depends on how much 'flexibility' you really need.

If you know in advance what you could possibly display (and the sequence of things in the Tabs / left nav menu is not CRUCIAL) then this may work for you.

Cheers,

Paul

---

<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: [27 June 2020 16:56 UTC](https://discourse.nodered.org/t/assign-ui-widgets-to-tab-and-group-dynamically-in-subflow/27423/4 "2020-06-27T16:56:13Z")

</div>

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