# UDP In Node, How to get the global param for UDP port set?

**URL:** https://discourse.nodered.org/t/udp-in-node-how-to-get-the-global-param-for-udp-port-set/80991
**Category:** General
**Created:** [3 September 2023 02:17 UTC](https://discourse.nodered.org/t/udp-in-node-how-to-get-the-global-param-for-udp-port-set/80991 "2023-09-03T02:17:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![goredhawk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/goredhawk/32/82522_2.png) [@goredhawk](https://discourse.nodered.org/u/goredhawk)
#### Post date: [3 September 2023 02:17 UTC](https://discourse.nodered.org/t/udp-in-node-how-to-get-the-global-param-for-udp-port-set/80991/1 "2023-09-03T02:17:57Z")

</div>

Hi，I use UDP in node, and i already set the global port , like this:

```auto
global.set('QT_VHL_PORT', 9009);

```

and here is my question, how to get the global QT\_VHL\_PORT for UDP\_IN node port setting?

 ![nII5TwZTfi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c1ebc32f582b4f2d10a09fb23da442cdd9048059.jpeg)  
By the way, for udp out node , get the global QT\_VHL\_PORT is easy to set, no problem.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [3 September 2023 05:35 UTC](https://discourse.nodered.org/t/udp-in-node-how-to-get-the-global-param-for-udp-port-set/80991/2 "2023-09-03T05:35:08Z")

</div>

> [@goredhawk](#):
>
> ![nII5TwZTfi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c1ebc32f582b4f2d10a09fb23da442cdd9048059.jpeg)

This is not supported. You can use an environment variable though. See: [Using environment variables : Node-RED](https://nodered.org/docs/user-guide/environment-variables)

---

<div class="post-metadata">

### Author: ![goredhawk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/goredhawk/32/82522_2.png) [@goredhawk](https://discourse.nodered.org/u/goredhawk)
#### Post date: [3 September 2023 06:12 UTC](https://discourse.nodered.org/t/udp-in-node-how-to-get-the-global-param-for-udp-port-set/80991/3 "2023-09-03T06:12:51Z")

</div>

Thanks for reply , your suggestion of environment variable is exactly what i want.

---

<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: [17 September 2023 06:13 UTC](https://discourse.nodered.org/t/udp-in-node-how-to-get-the-global-param-for-udp-port-set/80991/4 "2023-09-17T06:13:40Z")

</div>

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