# How to get property of config node

**URL:** https://discourse.nodered.org/t/how-to-get-property-of-config-node/32615
**Category:** General
**Created:** [9 September 2020 02:24 UTC](https://discourse.nodered.org/t/how-to-get-property-of-config-node/32615 "2020-09-09T02:24:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)
#### Post date: [9 September 2020 02:24 UTC](https://discourse.nodered.org/t/how-to-get-property-of-config-node/32615/1 "2020-09-09T02:24:03Z")

</div>

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

![config_node](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/1/51bd4e978cb3111a9270161e8f0e5bc5cbb31e2f.png)

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

```auto
// 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.

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [9 September 2020 05:58 UTC](https://discourse.nodered.org/t/how-to-get-property-of-config-node/32615/2 "2020-09-09T05:58:53Z")

</div>

Could you try:

```auto
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.

---

<div class="post-metadata">

### Author: ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)
#### Post date: [9 September 2020 07:19 UTC](https://discourse.nodered.org/t/how-to-get-property-of-config-node/32615/3 "2020-09-09T07:19:07Z")

</div>

@bakman2 Thank you for your enthusiastic support!  
Solved.

---

<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: [23 September 2020 07:19 UTC](https://discourse.nodered.org/t/how-to-get-property-of-config-node/32615/4 "2020-09-23T07:19:07Z")

</div>

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