# \[SOLVED\] Button that passes through events as clicks but not config messages?

**URL:** https://discourse.nodered.org/t/solved-button-that-passes-through-events-as-clicks-but-not-config-messages/100731
**Category:** Dashboard
**Created:** [7 April 2026 22:15 UTC](https://discourse.nodered.org/t/solved-button-that-passes-through-events-as-clicks-but-not-config-messages/100731 "2026-04-07T22:15:33Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Radoom](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/radoom/32/106597_2.png) [@Radoom](https://discourse.nodered.org/u/Radoom)
#### Post date: [7 April 2026 22:15 UTC](https://discourse.nodered.org/t/solved-button-that-passes-through-events-as-clicks-but-not-config-messages/100731/1 "2026-04-07T22:15:33Z")

</div>

I have a Dashboard (v1) button that gets text and color property messages from a bespoke logic. And when clicked in the UI dashboard, it also triggers a complex logic behind it. That all works fine. Messages for config (font, color, label) arrive on input, and the button changes.

Now, I have a hardware button in the house that "noobs" shall be able to push without the need to fiddle with the dashboard UI on a device and locate that specific UI button.

So: I want the "hardware button pressed" event to arrive at the UI button and trigger it to fire the logic behind it. So I would normally simply active "If message arrives on input, emulate a button click". But I can't do that in this case, because if I do, every "config message" arriving also triggers a button click.

How can I control the buttons appearance AND only have those "hardware button trigger events" passed through? With dashboard v1 preferrably to not be forced to migrate/rebuild my whole complex logic (several dozen buttons on that dashboard also from various other flows; so I'd have to migrate them ALL just because of this one problem to keep all in one place - nightmare, even with half-automatic migration I fear).

Last resort, V2, if only that makes it possible... hope not 🙂

---

<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: [7 April 2026 22:45 UTC](https://discourse.nodered.org/t/solved-button-that-passes-through-events-as-clicks-but-not-config-messages/100731/2 "2026-04-07T22:45:49Z")

</div>

You can define the button with HTML in a template node, listen to incoming messages, analyze them and decide whether to pass them to the button click handler.

---

<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: [7 April 2026 23:50 UTC](https://discourse.nodered.org/t/solved-button-that-passes-through-events-as-clicks-but-not-config-messages/100731/3 "2026-04-07T23:50:38Z")

</div>

Welcome to the forum @Radoom .

To distinguish between an actual button click and a passed-on message, set some extra message property eg

```auto
source: "inject"

```

That property will be passed on by the button, but an actual button click will not set it.

I expected to be able to do this with msg.topic but it seems not to work.

---

<div class="post-metadata">

### Author: ![Radoom](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/radoom/32/106597_2.png) [@Radoom](https://discourse.nodered.org/u/Radoom)
#### Post date: [8 April 2026 07:26 UTC](https://discourse.nodered.org/t/solved-button-that-passes-through-events-as-clicks-but-not-config-messages/100731/4 "2026-04-08T07:26:23Z")

</div>

jbudd, thanks, that was a hint in the right direction. I had that in the back of my head yesterday but it was too late to allow it to come forward 🙂

I have now added a property _msg.isconfig_ to the inbound nodes sending format properties to the UI button node. I set it to be boolean (and true), but that really doesn't matter, as only the existence of a _distinguishing_ property does the trick.

The hardware button node's messages do not have this property _at all_.  
Also, the UI button will not add this property if it is clicked, nor will it remove it if it emulates a click on any incoming message.

So:

- When a config message arrives, the UI button "auto-clicks", and the "unwanted" forwarded message still has the _msg.isconfig_ property.
- When a hardware event arrives (also, and as intended auto-clicking the UI button), or the UI button is actually clicked, the "wanted" forwarded or UI-triggered messages _lack_ this property.

Behind the UI button node a switch node checks: _msg.isconfig_ `is null`. With this:

- only the _intended_ messages (i.e. those that _do not_ have the _isconfig_ property) pass through this switch node
- Config messages pass (i.e. fake-trigger) the UI button, but get lost at this post-filtering switch node.

Happy 🙂

---

<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: [22 April 2026 07:26 UTC](https://discourse.nodered.org/t/solved-button-that-passes-through-events-as-clicks-but-not-config-messages/100731/5 "2026-04-22T07:26:32Z")

</div>

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