# Dynamic parameters inside nodes

**URL:** <https://discourse.nodered.org/t/dynamic-parameters-inside-nodes/52749>\
**Category:** General\
**Tags:** node-red-dashboard\
**Created:** [26 October 2021 11:02 UTC](https://discourse.nodered.org/t/dynamic-parameters-inside-nodes/52749 "2021-10-26T11:02:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![xjust](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/xjust/32/39096_2.png) [@xjust](https://discourse.nodered.org/u/xjust)\
**Post date:** [26 October 2021 11:02 UTC](https://discourse.nodered.org/t/dynamic-parameters-inside-nodes/52749/1 "2021-10-26T11:02:27Z")

</div>

Hi

Is there any way to declare and use a dynamic parameter inside node's settings without injecting everything to it ?  
Most of the values there are static , only the Hostname in my case needs changing.

I have about 70 instances of the exact same flow that only has one variable that needs changing inside these nodes.

---

<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:** [26 October 2021 12:43 UTC](https://discourse.nodered.org/t/dynamic-parameters-inside-nodes/52749/2 "2021-10-26T12:43:33Z")

</div>

> [@xjust](#):
>
> I have about 70 instances of the exact same flow that only has one variable that needs changing inside these nodes

In this case, I would probably use the new link call and only have one flow that is called from 70 places (like a subroutine) and pass the variable part in the msg.

Alternatively, package this identical flow into a subflow & then create 70 instances each with their own env variables (or pass variable in the subflow)

---

<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:** [26 October 2021 14:58 UTC](https://discourse.nodered.org/t/dynamic-parameters-inside-nodes/52749/3 "2021-10-26T14:58:36Z")

</div>

When does it need changing - actually dynamically during runtime ? or is it "configurable" before deploy (and then static) ? If the later then you can also use environment variables to set it outside of Node-RED and then change it for that machine etc.

---

<div class="post-metadata">

**Author:** ![xjust](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/xjust/32/39096_2.png) [@xjust](https://discourse.nodered.org/u/xjust)\
**Post date:** [26 October 2021 15:32 UTC](https://discourse.nodered.org/t/dynamic-parameters-inside-nodes/52749/4 "2021-10-26T15:32:50Z")

</div>

I have thermostat function through snmp on a IOT device that can read temperature and toggle a relay output. There is also time scheduling enabled in this. So, its a matter of reading and setting a few parameters through snmp on it.

I made one running instance and I need about 70 almost ideltical ones, apart from assigning diferent ips (and dashboard group outputs)

Since going copy/paste of it and manually changing each ip might take little a while.  
I am looking for a easy way to multiply this flow.  
Subflow method doesnt really work since i have more than one input/output enabled in this flow.

For now the only solution I got is to generate different flows by modifing the export content on the current flow.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [26 October 2021 21:31 UTC](https://discourse.nodered.org/t/dynamic-parameters-inside-nodes/52749/5 "2021-10-26T21:31:31Z")

</div>

Hi there, I don't think this is about creating custom nodes though is it? If not, could you please change the catgory for this post?

---

<div class="post-metadata">

**Author:** ![xjust](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/xjust/32/39096_2.png) [@xjust](https://discourse.nodered.org/u/xjust)\
**Post date:** [27 October 2021 07:07 UTC](https://discourse.nodered.org/t/dynamic-parameters-inside-nodes/52749/6 "2021-10-27T07:07:43Z")

</div>

Dont really know which category this fits actually. Any suggestion ?

---

<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:** [27 October 2021 07:15 UTC](https://discourse.nodered.org/t/dynamic-parameters-inside-nodes/52749/7 "2021-10-27T07:15:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/3/e32e0e096ad7752f91e03594103e196cece47802.png)

---

<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:** [26 December 2021 07:16 UTC](https://discourse.nodered.org/t/dynamic-parameters-inside-nodes/52749/8 "2021-12-26T07:16:53Z")

</div>

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