How to get property of config node

In the config node node-red-contrib-config, I have set properties:

config_node

I would like to get these properties in the Function node but an error occurred while trying to execute the following commands:

// 1."ReferenceError: localFilePath is not defined (line 2, col 23)"
var path = global.get(localFilePath);

// 2."TypeError: Cannot read property 'get' of undefined"
var path = msg.global.get(localFilePath);

// 3."TypeError: Cannot read property 'getNode' of undefined"
var path = RED.nodes.getNode(config.localFilePath);

Inside Function node can I get property of config node?
Can you please suggest way how can I do this?
Any hint will be great.
Thanks.

Could you try:

global.get("localFilePath");

instead ?

Note that you can see these variables in the context data tab, if they show up there (you may need to click the little refresh button), you can read them as shown above.

1 Like

@bakman2 Thank you for your enthusiastic support!
Solved.

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