Changing a Comment-Node name via Function-Node code

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".

Hi @xytsrm

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

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

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


After (and after reloading page):

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.

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.

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

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

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

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?

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

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.

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