# Changing a Comment-Node name via Function-Node code

**URL:** <https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632>\
**Category:** General\
**Created:** [5 November 2023 23:11 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632 "2023-11-05T23:11:41Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [5 November 2023 23:11 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/1 "2023-11-05T23:11:41Z")

</div>

Is there a way to address a specific Comment-node via a Function-Node code to alter it's name?

X

I think I know the the answer; and it's NO.; one can only change the "status".

---

<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:** [6 November 2023 08:57 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/2 "2023-11-06T08:57:46Z")

</div>

Hi @xytsrm

> I think I know the the answer; and it's NO

That is correct. One node cannot modify another node's configuration.

---

<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:** [6 November 2023 10:48 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/3 "2023-11-06T10:48:40Z")

</div>

You can manipulate flows.json as this inadvisable flow demonstrates  
Before inject:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/1/810a80a8f044142c75d07fcff3812e16d4e5e41c.png)  
After (and after reloading page):  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c16250cb477965d81dae7d4ad597f0bab6f62f7d.png)

It might be a fairly straightforward project to create a new node based on Comment but accepting an input.

It would go against the mantra "The editor is not a dashboard" though.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [6 November 2023 13:25 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/4 "2023-11-06T13:25:49Z")

</div>

Thanks for the confirmation & suggestions.

What I was looking for was a node I could use as a Flow title that could change and reflect the status, or state of the Flow as it operated. The Debug pane is not useful, as the information scrolls.

X.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [7 November 2023 07:17 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/5 "2023-11-07T07:17:16Z")

</div>

You could also simply use a debug node and just send it what you want, then just show it in the debug node status

If this is not enough, you can add a function node instead and use it's node status to show the needed information. I do this frequently, like in the example below

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

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [7 November 2023 13:14 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/6 "2023-11-07T13:14:12Z")

</div>

Hi krambriw,

Thanks for the suggestion. I actually tried the "status" trick. ; it just isn't large enough. It's too bad something like a Banner-Node doesn't exist, where messages sent to it get displayed. It should also have properties that can affect Font-size and color, as well as background color. Also, some nodes like suncalc can be directly accessed accessed via code rather than wired; it seems if a node's data can be read, data could be written.

Oh well; I can dream - lol

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [7 November 2023 14:09 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/7 "2023-11-07T14:09:17Z")

</div>

If you then would use a function node like I do and set 0 outputs, seems it does not have that 32 char limitation, could maybe be a solution to accept

If not, there are always the possibility to contribute with a new node to share, maybe you could start with a clone or copy of the normal comment node and add an input to it

---

<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:** [7 November 2023 14:20 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/8 "2023-11-07T14:20:24Z")

</div>

Would you not be better to use node-red-dashboard for showing the ongoing status? That is what it is for.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [7 November 2023 14:26 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/9 "2023-11-07T14:26:08Z")

</div>

> [@Colin](#):
>
> Would you not be better to use node-red-dashboard for showing the ongoing status? That is what it is for.

What do you mean by using the dashboard for showing the 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:** [7 November 2023 14:26 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/10 "2023-11-07T14:26:58Z")

</div>

Rather than trying to use the editor as a dashboard, use the dashboard.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [7 November 2023 14:48 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/11 "2023-11-07T14:48:12Z")

</div>

From the Node-Red site on the Dashboard:

> **NOTE:** This project is based on Angular v1 - As that is now no longer maintained, this project should be considered to be on "life support". Small patches will be applied on a best can do basis, but there will be no major feature upgrades, and underlying security breakage may occur.

Also, it would not be useful for my intended purpose.

---

<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:** [6 January 2024 14:48 UTC](https://discourse.nodered.org/t/changing-a-comment-node-name-via-function-node-code/82632/12 "2024-01-06T14:48:39Z")

</div>

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