# Get value of another node from a dialog of a node

**URL:** https://discourse.nodered.org/t/get-value-of-another-node-from-a-dialog-of-a-node/53544
**Category:** General
**Created:** [11 November 2021 03:10 UTC](https://discourse.nodered.org/t/get-value-of-another-node-from-a-dialog-of-a-node/53544 "2021-11-11T03:10:47Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![heeboventure](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/heeboventure/32/50028_2.png) [@heeboventure](https://discourse.nodered.org/u/heeboventure)
#### Post date: [11 November 2021 03:10 UTC](https://discourse.nodered.org/t/get-value-of-another-node-from-a-dialog-of-a-node/53544/1 "2021-11-11T03:10:47Z")

</div>

Hi,

I was wondering if I can get value of node B in a flow from a dialog of node A.

For example,

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/22ecb6f74098b4b326beeb3f8aa1099f9e544ee6.png)  
Here, I opened the dialog of 'answer' node.  
I would like to get the name value of 'comment' node in the flow (which is 'chocolate')  
and put it into the name of 'answer' node.

Is there any way to do that?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)
#### Post date: [11 November 2021 10:05 UTC](https://discourse.nodered.org/t/get-value-of-another-node-from-a-dialog-of-a-node/53544/2 "2021-11-11T10:05:44Z")

</div>

I don't think that is possible. Why do you want to do that?

---

<div class="post-metadata">

### Author: ![heeboventure](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/heeboventure/32/50028_2.png) [@heeboventure](https://discourse.nodered.org/u/heeboventure)
#### Post date: [15 November 2021 08:16 UTC](https://discourse.nodered.org/t/get-value-of-another-node-from-a-dialog-of-a-node/53544/3 "2021-11-15T08:16:20Z")

</div>

I'm trying to type a specific file path string into node A and get that string in node B, to find a specific file using that path. And because I'm trying to use node A in other flows as well, it has to be separate node.  
Do you think there's a way to set global variable over this entire node-red editor, then?

---

<div class="post-metadata">

### Author: ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)
#### Post date: [15 November 2021 09:34 UTC](https://discourse.nodered.org/t/get-value-of-another-node-from-a-dialog-of-a-node/53544/4 "2021-11-15T09:34:08Z")

</div>

Yes, a global variable should do what you want.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [15 November 2021 10:12 UTC](https://discourse.nodered.org/t/get-value-of-another-node-from-a-dialog-of-a-node/53544/5 "2021-11-15T10:12:25Z")

</div>

In general nodes re expected to be independent - and scoped locally. However if both nodes are "yours" and part fo the same package then they can indeed share a scope, or you can use a config node which appear as a sub level config panel that your other nodes can also reference - see [Configuration nodes : Node-RED](https://nodered.org/docs/creating-nodes/config-nodes)

---

<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: [14 January 2022 10:13 UTC](https://discourse.nodered.org/t/get-value-of-another-node-from-a-dialog-of-a-node/53544/6 "2022-01-14T10:13:08Z")

</div>

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