# \[v1\] Exclude output when the input message regard only buttons characteristics

**URL:** <https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014>\
**Category:** Dashboard\
**Created:** [29 October 2026 09:37 UTC](https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014 "2026-10-29T09:37:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiovanniG](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@GiovanniG](https://discourse.nodered.org/u/GiovanniG)\
**Post date:** [29 October 2026 09:37 UTC](https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014/1 "2026-10-29T09:37:58Z")

</div>

Hi, I'm using the version1, half control is made manually by dashboard's interface, half is by scenarios and automated logics. As I want to reflect the status of the automations I pass-by the message throught the button, so I enable the function.  
Now I would translate the button name to another language, so I input a msg.label only but as result I have a msg.payload output with the actual status, this will generate hardware commands that I would not do.  
Any way to make the button node output only when a msg.payload is input? or chance to inject a "msg.no\_output" so it will ignore the message to output?

Thank you a lot!

---

<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:** [29 October 2026 11:01 UTC](https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014/2 "2026-10-29T11:01:08Z")

</div>

You can simply add a switch node **after** the button it allow/deny the message passing on downstream.

Add one entry: `is null` `msg`.`no_output`

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/c/5c709650e7249eb3db9fd9df85e9366a9398d946.png)

Alternatively set the topic for the lang update to something like "lang" and test that topic != "lang"

PS, dashboard 1 is unlikely to get any new features (it is deprecated).

---

<div class="post-metadata">

**Author:** ![GiovanniG](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@GiovanniG](https://discourse.nodered.org/u/GiovanniG)\
**Post date:** [29 October 2026 12:54 UTC](https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014/3 "2026-10-29T12:54:49Z")

</div>

thank you for your kind reply,  
I think the switch can't solve this problem, the message output from button is the same, there are no differences if I input it a payload or simply a msg.label, only the msg.state comes out, so I can't distinguish it.  
If there is no trick to stop output message, or to force copy the original message, or any way to distinguish, then the only way I have is to double all the connections to each button and following node and stop allow messages pass by buttons

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [29 October 2026 13:40 UTC](https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014/4 "2026-10-29T13:40:26Z")

</div>

For messages which are only required to update the button status, add another message property, msg.donotpass with any value, true say.  
The switch node should test if msg.donotpass is null, thus these messages will not propagate.

(I tried with msg.no\_output as suggested above. it gave me an error)

---

<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:** [29 October 2026 13:41 UTC](https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014/5 "2026-10-29T13:41:10Z")

</div>

> [@GiovanniG](#):
>
> I'm using the version1

I presume you mean that you are using the old node-red-dashboard.

Here is an example flow showing how to prevent a message containing msg.label from triggering the button, using a switch node to check whether msg.label is present.

```auto
[{"id":"848c13ddd8886314","type":"ui_button","z":"bdd7be38.d3b55","name":"","group":"a8e4a3.d31edb6","order":3,"width":"2","height":"1","passthru":true,"label":"{{label}}","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"pressed","payloadType":"str","topic":"topic","topicType":"msg","x":310,"y":5120,"wires":[["9813da237d459daa"]]},{"id":"e94a1b914577b995","type":"debug","z":"bdd7be38.d3b55","name":"debug 61","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":620,"y":5120,"wires":[]},{"id":"f5a44691668b775f","type":"inject","z":"bdd7be38.d3b55","name":"Set label, no trigger","props":[{"p":"label","v":"A Label","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":130,"y":5120,"wires":[["848c13ddd8886314"]]},{"id":"9813da237d459daa","type":"switch","z":"bdd7be38.d3b55","name":"Real press?","property":"label","propertyType":"msg","rules":[{"t":"null"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":5120,"wires":[["e94a1b914577b995"]]},{"id":"18894ebb839bd73a","type":"inject","z":"bdd7be38.d3b55","name":"Trigger press","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":5060,"wires":[["848c13ddd8886314"]]},{"id":"a8e4a3.d31edb6","type":"ui_group","name":"Chart","tab":"8032fe72.980b98","order":3,"disp":false,"width":"12","collapse":false,"className":""},{"id":"8032fe72.980b98","type":"ui_tab","name":"PnH","icon":"dashboard","order":2,"disabled":false,"hidden":false},{"id":"01c951ac00145d68","type":"global-config","env":[],"modules":{"node-red-dashboard":"3.6.6"}}]

```

---

<div class="post-metadata">

**Author:** ![GiovanniG](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@GiovanniG](https://discourse.nodered.org/u/GiovanniG)\
**Post date:** [29 October 2026 14:22 UTC](https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014/6 "2026-10-29T14:22:11Z")

</div>

Thank you Colin, honestly I don't see any difference on output message from button, there is only msg.state in both cases, with or without the enter of msg.label.  
there is no msg.label output, maybe somethign wrong with my NR?  
I've flagged the Pass through msg if payload matches valid state, but I'm not sending a msg.payload, just a msg.label  
in your NR do you notice a different behaviour?

---

<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:** [29 October 2026 15:25 UTC](https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014/7 "2026-10-29T15:25:03Z")

</div>

Did you try my flow by importing and running it?

Please select your button node and inject node and Export and paste the flow here so I can see what you are doing.

---

<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:** [29 October 2026 15:27 UTC](https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014/8 "2026-10-29T15:27:47Z")

</div>

> [@GiovanniG](#):
>
> I've flagged the Pass through msg if payload matches valid state

The button node does not have a field with that text. Are using a Switch node not a Button node?

---

<div class="post-metadata">

**Author:** ![GiovanniG](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@GiovanniG](https://discourse.nodered.org/u/GiovanniG)\
**Post date:** [29 October 2026 17:59 UTC](https://discourse.nodered.org/t/v1-exclude-output-when-the-input-message-regard-only-buttons-characteristics/102014/9 "2026-10-29T17:59:56Z")

</div>

please forgive me, my big mistake. It works correctly, I've noticed it on another platform with NR, then I tried to debug.. and I noticed that the debug node was set ony for payload ((( that's very strange because I don't like it, and when I place a new debug node on the flow I suddenly swtch to full message.  
So my big mistake :(( sorry!
