# Dashboard 2.0 ui elements order in subworkflow

**URL:** <https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [23 November 2024 11:46 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383 "2024-11-23T11:46:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![NodyRed](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@NodyRed](https://discourse.nodered.org/u/NodyRed)\
**Post date:** [23 November 2024 11:46 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383/1 "2024-11-23T11:46:32Z")

</div>

Adding multiple ui elements to a subworkflow, they appear in the order they were added. How can the order be changed?

---

<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:** [23 November 2024 13:03 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383/2 "2024-11-23T13:03:09Z")

</div>

They can't. Yet.

You could temporarily move them to a regular flow, order them, move them back.

Looking forward, if we can't get WYSIWYG editing working for subflows, I am thinking of exposing the `order` property to the user when the nodes detect themselves to be contained in a subflow.

---

<div class="post-metadata">

**Author:** ![phedders](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/phedders/32/33548_2.png) [@phedders](https://discourse.nodered.org/u/phedders)\
**Post date:** [23 November 2024 14:27 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383/3 "2024-11-23T14:27:37Z")

</div>

See the discussion here also:

> [@REQUEST - Add a position/priority/order value property to dashboard nodes for Subflow and dynamic ordering](https://discourse.nodered.org/t/request-add-a-position-priority-order-value-property-to-dashboard-nodes-for-subflow-and-dynamic-ordering/93269/4):
>
> Both effectively slight_smile Primarily ordering subflow instances in a group. I can now remove hundreds of duplicate node groups in a dashboard flow because I can pass suitable data to instances - thats grreat but nodes appear in a random order and the dashboard side control cant re-order them because being dynamic they do not exist. Yet. But if I give a priority to each instance for the group to build up the right ordering then that would be amazing. Now if you also wanted to be able to g…

Follow that to get to a feature request for all of the priority/ordering of dashboard items to be exposed programmatically. Feel free to add to that ticket - I'm not sure if there is a voting system, but I would love to see how many other people would find that useful.

---

<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:** [23 November 2024 14:43 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383/4 "2024-11-23T14:43:50Z")

</div>

I _think_ that discussion is about dynamically setting the position at run time, rather than at design/deploy time.

There is already an open feature request for specifying widget order within a subflow. [Widget ordering in subflows · Issue #1062 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/1062)

---

<div class="post-metadata">

**Author:** ![NodyRed](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@NodyRed](https://discourse.nodered.org/u/NodyRed)\
**Post date:** [25 November 2024 19:32 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383/5 "2024-11-25T19:32:06Z")

</div>

I was able to arrange the elements manually as @Steve-Mcl suggested.  
Now the issue is that I have dashboard elements from workflow and elements out of subworkflows. I can't order workflow elements against subworkflow elements. Like adding a text node inbetween subworkflows.  
Seems like I'll need to move all dashboard elements out of subworkflows an order them manually.

---

<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:** [25 November 2024 21:12 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383/6 "2024-11-25T21:12:28Z")

</div>

> [@NodyRed](#):
>
> I can't order workflow elements against subworkflow elements

There is an open issue for this, but it has not received much love recently. You could add a comment to the issue expressing your interest. [Unable to position a subflow containing a ui-node on the dashboard · Issue #710 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/710)

---

<div class="post-metadata">

**Author:** ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)\
**Post date:** [25 November 2024 22:23 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383/7 "2024-11-25T22:23:13Z")

</div>

+1 left a comment over there 😉

---

<div class="post-metadata">

**Author:** ![NodyRed](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@NodyRed](https://discourse.nodered.org/u/NodyRed)\
**Post date:** [26 November 2024 14:23 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383/8 "2024-11-26T14:23:18Z")

</div>

I'm currently doing copy paste of the dashboad elements for each subworkflow which is ok. But what is strange and also making it difficult is:

a) Hovering over the dashboard layout item on the right side, does not highlight the element. It requires a push on the focus button. Makes it hard to check the order of the dashboard elements as wanted.

b) Copy and pasting several dashboad items screws up the order of the copied elements and the pasted ones. Some elements get added at the bottom of the list, some of the copied items get replaced by the pasted ones. I can see no strategy behind. I would expect either all pasted elements get at the end of the list as a group or as in dashboard 1 each pasted item below the one it was copied from.  
Or maybe I'm just not used to the new way.

I refer to copied elements as the source elements, pasted elements as the copied version.

c) It would help a lot if `ui_update` as input could be set to any other name. E.g. a function node shall outputs 3 different `ui_update` parameter sets for 3 buttons. Currently I can store them in `msg.A`, `msg.B`, `msg.C` to have them within one message, afterwards copying `A`to `ui_update` for button 1, `B` to `ui_update` for button 2 and so forth. working for sure, but not so nice and efficient.

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [26 November 2024 14:49 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383/9 "2024-11-26T14:49:47Z")

</div>

For c) you could send each `msg` using `node.send()` with a different topic for each `msg` and then use a `switch node` to direct the `msg`'s to the relevant buttons.

---

<div class="post-metadata">

**Author:** ![NodyRed](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@NodyRed](https://discourse.nodered.org/u/NodyRed)\
**Post date:** [26 November 2024 15:07 UTC](https://discourse.nodered.org/t/dashboard-2-0-ui-elements-order-in-subworkflow/93383/10 "2024-11-26T15:07:16Z")

</div>

@Buckskin True, but I also need 3 switch nodes. I would like to send one msg (with A,B,C) to 3 buttons and have the button select A, B or C (predefining it in the buttons property upfront).
