# Pass subflow info under the node info

**URL:** <https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172>\
**Category:** General\
**Tags:** subflow\
**Created:** [25 November 2023 08:58 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172 "2023-11-25T08:58:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![usky73](https://avatars.discourse-cdn.com/v4/letter/u/b19c9b/32.png) [@usky73](https://discourse.nodered.org/u/usky73)\
**Post date:** [25 November 2023 08:58 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/1 "2023-11-25T08:58:39Z")

</div>

Hi, just discovered the subflow feature and it is great.  
I would like to go further and have the same feature than some other nodes, means show the main values under the node icon like this home assistant node, like the result & a status color.

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

Is it documented ? And where ?

---

<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:** [25 November 2023 10:09 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/2 "2023-11-25T10:09:04Z")

</div>

Welcome to the forum @usky73

What sort of nodes do you want to show a Status display for? You can do it for Function nodes (see [Writing Functions : Node-RED](https://nodered.org/docs/user-guide/writing-functions)) but for other nodes the status shown is determined by the node author.

---

<div class="post-metadata">

**Author:** ![usky73](https://avatars.discourse-cdn.com/v4/letter/u/b19c9b/32.png) [@usky73](https://discourse.nodered.org/u/usky73)\
**Post date:** [25 November 2023 10:15 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/3 "2023-11-25T10:15:26Z")

</div>

I finally find my answer here : [https://community.home-assistant.io/t/tuto-building-subflows-with-node-status-how-i-keep-it-simple/337239](https://community.home-assistant.io/t/tuto-building-subflows-with-node-status-how-i-keep-it-simple/337239)

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [25 November 2023 10:19 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/4 "2023-11-25T10:19:02Z")

</div>

FWIW.  
A subflow has a status node output option.

![Screenshot 2023-11-25 at 10.16.30](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/82522dfd03a01935e6138efbdf478a26f1fe45f6.png)

and to set the status.

```js
{
  payload: {
    fill: "green",
    shape: "dot",
    text: "connected"
  }
}

```

![Screenshot 2023-11-25 at 10.18.49](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/e/be49aa9a8906961670ccc0bca50be28458715e0a.png)

[https://nodered.org/docs/creating-nodes/status](https://nodered.org/docs/creating-nodes/status)

---

<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:** [25 November 2023 10:24 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/5 "2023-11-25T10:24:57Z")

</div>

I misinterpreted the question, I thought you meant that you know how to do it with subflows, but wanted to add status to other nodes.

---

<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:** [25 November 2023 11:16 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/6 "2023-11-25T11:16:26Z")

</div>

@marcus-j-davies is correct, but it isn't quite that simple.

You have to add/include the `status` node in the sub-flow and (what caught me a few times):  
**Select only the nodes who are sending their STATUS information**

If you leave it as ALL NODES (default) you are not going to see what you want, as EVERY NODE will send their _status_ to the `status` node.

Or - another way (as @marcus-j-davies may have meant) - make a message and send it out of a `function` node's extra (added/new) output.

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [25 November 2023 11:28 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/7 "2023-11-25T11:28:12Z")

</div>

> [@Trying\_to\_learn](#):
>
> You have to add/include the `status` node in the sub-flow and (what caught me a few times):  
> **Select only the nodes who are sending their STATUS information**

Correct!

To "forward" so to speak an internal Node status out of the subflow, but I don't know if it includes the icon, colour - Have never really used the `status` node myself

---

<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:** [25 November 2023 19:57 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/8 "2023-11-25T19:57:28Z")

</div>

(Sorry to seem to be taking over the thread)

As I play with subflows a lot, I discovered a painful lesson.

I made a subflow with a `function` node that used `node.status` to indicate what it is doing.

I ticked the `status` option and connected a `status` node to it.  
(Nothing extra done. The subflow had a few other nodes in it too.)

I was wondering why I wasn't seeing the `status` when looking at the subflow.  
Then I realised all the OTHER NODE'S _status messages_ were also being _shown_. And as they were also _included_: the desired message was overwritten by the other ones.

Went into the subflow, opened the `status` node and said `only selected nodes` and ticked my `function` node.

All good from there on in.

Yes, I could have done it a different way and added an extra output and sent the messages directly to the `status` node's input.  
But to keep things _generic_......  
(and if ever you want to see the status of a non-function node.....

So just to share that bit of knowledge.  
Just because other nodes don't _show_ a `status message`, doesn't mean they don't; and in subflows: this matters.

---

<div class="post-metadata">

**Author:** ![usky73](https://avatars.discourse-cdn.com/v4/letter/u/b19c9b/32.png) [@usky73](https://discourse.nodered.org/u/usky73)\
**Post date:** [26 November 2023 06:38 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/9 "2023-11-26T06:38:49Z")

</div>

Thanks to all of you for your quick support.  
Very interesting.

I have a last question, if I use this status method

```auto
{
  payload: {
    fill: "green",
    shape: "dot",
    text: "connected"
  }
}

```

How to track if there is an error in the subflow execution ?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [26 November 2023 07:47 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/10 "2023-11-26T07:47:14Z")

</div>

I think you can use the `catch` node inside your subflow.

And then use the `message` property from it to display in the status.

```auto
{
  payload: {
    fill: "red",
    shape: "dot",
    text: msg.error.message
  }
}

```

![Screenshot 2023-11-26 at 08.16.56](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/e/fe8d57cb0787016da44892a01b39de0265f72c47.png)

---

<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:** [10 December 2023 07:47 UTC](https://discourse.nodered.org/t/pass-subflow-info-under-the-node-info/83172/11 "2023-12-10T07:47:34Z")

</div>

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