# Help with db-2 button node

**URL:** https://discourse.nodered.org/t/help-with-db-2-button-node/98403
**Category:** Dashboard
**Tags:** dashboard-2
**Created:** [31 July 2025 00:58 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403 "2025-07-31T00:58:38Z")
**Posts on this page:** 11
**Page:** 1

<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: [31 July 2025 00:58 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/1 "2025-07-31T00:58:39Z")

</div>

This is DB-2, not the old/original one.

Folks, I missed the memo on this.

(And now I shall digress quickly)

In the old dashboard, you/I could set what is shown with `{{msg.xxx}}` things and inject them into the button.

But I can't get that working with the new one.

This is the node:

```auto
[{"id":"de5be44bacf7ef7d","type":"ui-button","z":"b39000460508d582","group":"6f4a6f88bfbb219b","name":"","label":"HOLD","order":6,"width":"1","height":"1","emulateClick":false,"tooltip":"","color":"","bgcolor":"","className":"","icon":"","iconPosition":"left","payload":"X","payloadType":"str","topic":"topic","topicType":"msg","buttonColor":"{{msg.colour}}","textColor":"{{msg.txt}}","iconColor":"","enableClick":true,"enablePointerdown":false,"pointerdownPayload":"","pointerdownPayloadType":"str","enablePointerup":false,"pointerupPayload":"","pointerupPayloadType":"str","x":520,"y":490,"wires":[["5bdde14fb80b87f6","b5d74453ad226bca"]]},{"id":"6f4a6f88bfbb219b","type":"ui-group","name":"Group 1","page":"b9b507aa5c5840c2","width":"10","height":1,"order":1,"showTitle":false,"className":"","visible":"true","disabled":"false","groupType":"default"},{"id":"b9b507aa5c5840c2","type":"ui-page","name":"Down/Up load speed tester","ui":"379027033ed5c83a","path":"/page1","icon":"home","layout":"flex","theme":"84a68e3f4c6f8cdc","breakpoints":[{"name":"Default","px":"0","cols":"3"},{"name":"Tablet","px":"576","cols":"6"},{"name":"Small Desktop","px":"768","cols":"9"},{"name":"Desktop","px":"1024","cols":"12"}],"order":1,"className":"","visible":"true","disabled":"false"},{"id":"379027033ed5c83a","type":"ui-base","name":"My Dashboard","path":"/dashboard","appIcon":"","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false,"headerContent":"page","navigationStyle":"default","titleBarStyle":"default","showReconnectNotification":true,"notificationDisplayTime":1,"showDisconnectNotification":true,"allowInstall":true},{"id":"84a68e3f4c6f8cdc","type":"ui-theme","name":"Default Theme","colors":{"surface":"#63452c","primary":"#0094ce","bgPage":"#63452c","groupBg":"#63452c","groupOutline":"#cccccc"},"sizes":{"density":"default","pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]

```

I want it to .... _reflect_ what is coming into it.

eg:

```auto
{"_event":"node:bdbfe2be5baec569","_client":{"socketId":"yM2HDRVyC5rEppUfAAAD","socketIp":"127.0.0.1"},"topic":"","payload":0,"_msgid":"41164113ca0432b7","colour":"red","txt":"HOLD"}

```

Or:

```auto
{"_event":{"type":"click","clientX":453,"clientY":339,"bbox":{"x":404.20001220703125,"y":283.8500061035156,"width":81.80000305175781,"height":83.41665649414062,"top":283.8500061035156,"right":486.00001525878906,"bottom":367.26666259765625,"left":404.20001220703125}},"_client":{"socketId":"yM2HDRVyC5rEppUfAAAD","socketIp":"127.0.0.1"},"topic":"","payload":1,"_msgid":"41164113ca0432b7","colour":"green","txt":"PASS"}

```

Someone, please.

(Deleted something as I shot myself in the foot)

---

<div class="post-metadata">

### Author: ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)
#### Post date: [31 July 2025 01:11 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/2 "2025-07-31T01:11:35Z")

</div>

Try passing in the text via msg.ui\_update.label.

---

<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: [31 July 2025 01:13 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/3 "2025-07-31T01:13:19Z")

</div>

I have no idea what that means.  
Sad, but true.

Do you mean via msg.ui\_update.label?

---

<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: [31 July 2025 01:56 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/4 "2025-07-31T01:56:01Z")

</div>

I've tried for a long time with "chatgpt" and got nowhere.

I'm going to lunch now.

May be back later on today.

---

<div class="post-metadata">

### Author: ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)
#### Post date: [31 July 2025 02:00 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/5 "2025-07-31T02:00:08Z")

</div>

> [@Trying\_to\_learn](#):
>
> msg.ui\_update.label?

In a change node, set msg.ui\_update.label to the value that you want the button to show and connect that to the input of the button.

---

<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: [31 July 2025 03:29 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/6 "2025-07-31T03:29:52Z")

</div>

## Ok, now going "off topic".

Could someone help me understand the .... _structure_ of how these new buttons (etc) work and how I change their .... _attributes_?

Like text, colour etc....

---

<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: [31 July 2025 04:39 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/7 "2025-07-31T04:39:28Z")

</div>

> [@rakgupta](#):
>
> ui\_update.label

Ok, got the text side working.

Now, how about the colour?

I am really flying blind here.

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [31 July 2025 08:02 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/8 "2025-07-31T08:02:29Z")

</div>

I'm assuming that you have already read the documentation …

> **[Button ui-button | Node-RED Dashboard 2.0](https://dashboard.flowfuse.com/nodes/widgets/ui-button)**
>
> Buttons create interactive UI's and can trigger flows in Node-RED

---

<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: [31 July 2025 08:03 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/9 "2025-07-31T08:03:24Z")

</div>

Well, honestly:

No.

I had looked but THAT document/link didn't come up.

Thanks.

---

<div class="post-metadata">

### Author: ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)
#### Post date: [31 July 2025 09:15 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/10 "2025-07-31T09:15:57Z")

</div>

Anyone working with DB-2 must have this (living) document as his bible: [NR Dashboard 2.0 - documentation](https://dashboard.flowfuse.com/).

It is rare to see such clear & detailed documentation in the open-source realm (tanks @joepavitt). Let's use it!

---

<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: [14 August 2025 09:16 UTC](https://discourse.nodered.org/t/help-with-db-2-button-node/98403/11 "2025-08-14T09:16:11Z")

</div>

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