Nodered function automatically update !?!?

Hello Together!
I think the topic has certainly been discussed before, but I think I'm too stupid to find it :frowning:

  • I have a function in Nodered.
  • This is used several times.
  • If I change this function now, I want the content of all functions to change automatically with it.

I found the function with the library, that works so far, however, I then have to update each function individually.... does this somehow automatically?

Do I have to create a separate node for this?

I would be very grateful for some food for thought :wink:

Thanks already once!

Translated with (free version)

Make a subflow with just that function, and then use the subflow in place of the function nodes in your flow. Then whenever you update the subflow's function it will change them all.

1 Like

Or use link-in/out/call nodes, cleans up flows as well.

Wow! Thanks!! very fast :wink:

You can now also use the link-call node if you don't want to use a sub-flow. You just put your function node somewhere convenient with a link-in and link-out node attached and then use link-call that will send the inbound msg to the function and return the result.

To add to what Julian and @bakman2 said - If you are unsure how this might work, this post might clear that up for you: Unexpected behaviour with link call - #2 by Steve-Mcl

And this video may help...

1 Like

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