Flow context doesnt work


when I use in the function-Node the following:
flow.xyz = "test";

and then try to get the value with the following in another function-Node:

let a = flow.xyz;

then my variable "a" is undefined?

But when I do the same with "context.flow.xyz" instead of just "flow.xyz" it works?

I thought and read in the docs that "context.flow" and just "flow" is the same?

Would appreciate any help and explanation!

Use the built in functions as described in the docs: Writing Functions : Node-RED

Note, newer Node-RED has built-in "autocomplete" and macros too

1 Like

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