# Node.status clear in entire flow?

**URL:** <https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477>\
**Category:** General\
**Created:** [14 December 2020 11:32 UTC](https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477 "2020-12-14T11:32:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![softy2k](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/softy2k/32/23707_2.png) [@softy2k](https://discourse.nodered.org/u/softy2k)\
**Post date:** [14 December 2020 11:32 UTC](https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477/1 "2020-12-14T11:32:40Z")

</div>

Is there a possibility to make a clear node.status for an entire flow, triggered by some inject/function?

The only possibility I know is to give Restart Flows, but I'm not interested in this method.

---

<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:** [14 December 2020 11:56 UTC](https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477/2 "2020-12-14T11:56:12Z")

</div>

Restart flows is not guaranteed to clear the status text for all nodes, many nodes will initialise their status to a value and a retstart flows will cause the node to set its status to that value. There is no way to force all nodes to clear their status text, and in fact there can't be as each node is in control of its status.

---

<div class="post-metadata">

**Author:** ![meeki007](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/meeki007/32/12499_2.png) [@meeki007](https://discourse.nodered.org/u/meeki007)\
**Post date:** [14 December 2020 12:19 UTC](https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477/3 "2020-12-14T12:19:50Z")

</div>

That is why I always put a

```auto
//clear status icon
      node.status({});

```

when constructing the node and again right first msg comes in

```auto
this.on('input', async function(msg, send, done)

```

I also like to put timers, when i can, on all status msg

```auto
this.status(
        {
          fill: 'blue',
          shape: 'dot',
          text: "finished"
        });
        // clear/end status msg after 3 seconds
        setTimeout(status_clear, 1000);

```

---

<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:** [14 December 2020 13:29 UTC](https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477/4 "2020-12-14T13:29:17Z")

</div>

A further thought. Consider the MQTT nodes. Their status always tells you the state of the connection. If that were to be cleared then you would have no way of seeing whether it was connected or not.

---

<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:** [14 December 2020 14:18 UTC](https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477/5 "2020-12-14T14:18:16Z")

</div>

> [@softy2k](#):
>
> clear node.status for an entire flow

I’m curious why you would want to do that. Is it only to control the appearance of the flow in the editor (“not a dashboard”), or is there some other problem you need to solve?

---

<div class="post-metadata">

**Author:** ![softy2k](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/softy2k/32/23707_2.png) [@softy2k](https://discourse.nodered.org/u/softy2k)\
**Post date:** [14 December 2020 14:44 UTC](https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477/6 "2020-12-14T14:44:12Z")

</div>

Just for visual debug.

At a flow with a few nodes it is easy to follow where the data flows.  
But if you multiply by 10 the flow in the example, it is no longer easy to follow.

In other words, if a new value arrives, all status.nodes display the previous value.  
If I could reset status.node, I could see exactly where the stream was flowing.

```auto
[{"id":"5bf05cc7.5ff1ec","type":"inject","z":"fc92f4ca.d11a28","name":"Go","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":830,"y":2980,"wires":[["489accb3.a50684"]]},{"id":"489accb3.a50684","type":"function","z":"fc92f4ca.d11a28","name":"Some Function","func":"msg.payload = Math.random() * 100;\n\nif (msg.payload < 50) return [msg, null]\nelse return [null, msg]","outputs":2,"noerr":0,"initialize":"","finalize":"","x":1000,"y":2980,"wires":[["39597268.0ce6fe"],["4423c59f.f6fbd4"]]},{"id":"39597268.0ce6fe","type":"function","z":"fc92f4ca.d11a28","name":"1","func":"node.status({fill:'green', text : msg.payload})\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1190,"y":2940,"wires":[[]]},{"id":"4423c59f.f6fbd4","type":"function","z":"fc92f4ca.d11a28","name":"2","func":"node.status({fill:'red', text : msg.payload})\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1190,"y":3000,"wires":[[]]}]

```

---

<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:** [14 December 2020 16:23 UTC](https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477/7 "2020-12-14T16:23:03Z")

</div>

Status should not really be used for showing values... (the editor is NOT a dashboard :-)... it should show the state of the node like is it in error, connected, buffer full, etc.

---

<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:** [14 December 2020 16:50 UTC](https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477/8 "2020-12-14T16:50:24Z")

</div>

> [@softy2k](#):
>
> Just for visual debug.

No doubt that debugging can be difficult, and the developers are working on improvements like a [proper flow debugger](https://nodered.org/blog/2020/10/13/future-plans). In the meanwhile, there are a couple of things you might try in order to improve matters. You can identify which node in your example has changed its status by adding a `status` node connected to a `debug` node configured to show the node name:

```auto
[{"id":"5bf05cc7.5ff1ec","type":"inject","z":"8e3c2638.66102","name":"Go","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":250,"y":160,"wires":[["489accb3.a50684"]]},{"id":"489accb3.a50684","type":"function","z":"8e3c2638.66102","name":"Some Function","func":"msg.payload = Math.random() * 100;\n\nif (msg.payload < 50) return [msg, null]\nelse return [null, msg]","outputs":2,"noerr":0,"initialize":"","finalize":"","x":420,"y":160,"wires":[["39597268.0ce6fe"],["4423c59f.f6fbd4"]]},{"id":"39597268.0ce6fe","type":"function","z":"8e3c2638.66102","name":"1","func":"node.status({fill:'green', text : msg.payload})\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":610,"y":120,"wires":[[]]},{"id":"4423c59f.f6fbd4","type":"function","z":"8e3c2638.66102","name":"2","func":"node.status({fill:'red', text : msg.payload})\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":610,"y":180,"wires":[[]]},{"id":"4e525c00.139804","type":"status","z":"8e3c2638.66102","name":"","scope":null,"x":380,"y":260,"wires":[["f4e154b1.370ae"]]},{"id":"f4e154b1.370ae","type":"debug","z":"8e3c2638.66102","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"status.source.name","targetType":"msg","statusVal":"","statusType":"auto","x":570,"y":260,"wires":[]}]

```

Also, you can use a `complete` node to do some message tracing, as described in [this post](https://discourse.nodered.org/t/using-done-complete-for-debugging/21572).

---

<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:** [12 February 2021 16:50 UTC](https://discourse.nodered.org/t/node-status-clear-in-entire-flow/37477/9 "2021-02-12T16:50:29Z")

</div>

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