# Proposal: allow the change node to display status objects

**URL:** <https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643>\
**Category:** Feature Requests\
**Created:** [17 July 2018 17:53 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643 "2018-07-17T17:53:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [17 July 2018 17:53 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/1 "2018-07-17T17:53:36Z")

</div>

All,

This suggestion may seem a bit odd, but please bear with me. I have a couple of projects that make heavy use of `node.status` displays in the editor and status messages caught by `status` nodes and shown in the dashboard. I have been looking for a way to generate arbitrary status messages in the middle of a flow. So far, only the `function` and `bigstatus` nodes have worked for me, but both have drawbacks that would take too much space to describe here. The `change` node has access to the flow and global context variables and the processing power of the JSONata language, so these features can be used "for free" in generating a status object. Only a couple of lines of code are needed to display the status (`msg.status`), without (I believe) breaking existing flows. This may violate the "do one thing well" principle, but the `change` node is already something of a "Swiss Army knife," and I think the feature would be useful. Any thoughts?

Mike

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [17 July 2018 18:11 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/2 "2018-07-17T18:11:38Z")

</div>

I disagree that it is a Swiss Army Knife node - it has a well defined purpose of modifying msg/context properties. It provides a variety of ways of doing it, but that is the thing it does well.

I don't think getting it to display a status message fits with that role. You can use the Debug node to display status messages.

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [17 July 2018 19:31 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/3 "2018-07-17T19:31:26Z")

</div>

@knolleary,

I understand (and sort of anticipated) your reaction. No offense meant to the `change` node. The modification is so simple that I think I will keep it in a local copy of NR for a while for experimentation. Thanks for taking a look at my suggestion.

Using the `debug` node seems to be a non-starter here. As far as I can tell, it displays only the `msg.payload` text, with no control of the icon shape or fill. A `function` or `change` node would still be needed in front of it to do any necessary logic on the message and/or context in order to generate, for example, an error or warning message. Finally, to preserve the result of that logic as part of the message, the node doing the processing needs to be in the flow, not in a side branch with the `debug` node. When I first looked at this approach, I ended up doing the processing in a `function` node and having it use `node.status` to display the status, avoiding the `debug` node altogether.

Mike

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [17 July 2018 19:52 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/4 "2018-07-17T19:52:52Z")

</div>

in the debug node you can choose to display the complete msg object, or any specific part of the msg, like msg.topic or anything else that has been added to the msg object.

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [17 July 2018 20:15 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/5 "2018-07-17T20:15:26Z")

</div>

@zenofmud Understood, but Nick and I are talking about displaying the status in the editor widow, not the debug window (sidebar). This option is a checkbox labeled "node status (32 characters)" that appears only when the output is selected to be a message property, not the complete object.

---

<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:** [17 July 2018 22:15 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/6 "2018-07-17T22:15:49Z")

</div>

One of the core project tenets is that the editor is not a dashboard.

You say you are then using the status node to catch those messages (good) - but that only gets the "payload" part and not the shape or colour either - so debug would be just as good as that.

@zenofmud - If you select complete message you don't get the option of status as it's (deliberately) limited to 32 chars and you can't really stick much of the default object into 32 chars.

But yes you can select any property to hook the debug to to show any particular property - not just payload.

However - I would like to understand why the function node is inadequate for this purpose - don't worry about space... we have plenty here... 🙂

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [17 July 2018 22:24 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/7 "2018-07-17T22:24:43Z")

</div>

> One of the core project tenets is that the editor is not a dashboard.

Got it. I often develop flows on a small laptop screen with the sidebar hidden. It is nice to have status indicators on nodes like http, file i/o, serial, etc. to help see what is happening during testing.

---

<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:** [17 July 2018 22:41 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/8 "2018-07-17T22:41:10Z")

</div>

Yes exactly. They are indeed meant for that, to show the status of the node, like connection state, in error, depth of queue, etc. Not really meant for displaying things like value of payload etc.

So, what's wrong with function node for this ?

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [17 July 2018 23:15 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/9 "2018-07-17T23:15:01Z")

</div>

The function node is fine up to a point, and you'll soon see why I feel a bit foolish mentioning it. If I edit the flow and redeploy it, all the function status indicators disappear, making it harder to compare new results with old ones. Of course, this is the proper behavior, as we discussed some time ago ([[https://groups.google.com/d/msg/node-red/NB7A107PpU0/t6K\_uRl8BgAJ](https://groups.google.com/d/msg/node-red/NB7A107PpU0/t6K_uRl8BgAJ)]). In a custom node or my modification of the change node, I can preserve the display between deployments.

---

<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:** [17 July 2018 23:50 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/10 "2018-07-17T23:50:27Z")

</div>

and if you set the deploy mode to be "modified nodes" only then the function nodes shouldn't change either.... (as long as that works for the rest of your flow :-).... (unless you modify them of course)

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [19 July 2018 22:00 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/11 "2018-07-19T22:00:58Z")

</div>

@dceejay You're right, of course. Problem solved -- except for a slight preference for changing properties as opposed to writing JavaScript. I'll get over it.

Mike

---

<div class="post-metadata">

**Author:** ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)\
**Post date:** [28 July 2018 23:55 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/12 "2018-07-28T23:55:48Z")

</div>

What I'd really like to see in the future is the ability to add a "watchpoint" to a wire in between nodes to allow temporary debugging. What I dislike about debug nodes is they clutter the workspace a lot...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [29 July 2018 14:54 UTC](https://discourse.nodered.org/t/proposal-allow-the-change-node-to-display-status-objects/1643/13 "2018-07-29T14:54:16Z")

</div>

> [@drmibell](#):
>
> @dceejay You're right, of course. Problem solved -- except for a slight preference for changing properties as opposed to writing JavaScript. I'll get over it.

That's a good use for the library. You can save your nice, standard status display in the library as a template and reuse it really easily.
