# Subflow $ENV variable names feature request

**URL:** <https://discourse.nodered.org/t/subflow-env-variable-names-feature-request/58636>\
**Category:** General\
**Created:** [19 February 2022 07:16 UTC](https://discourse.nodered.org/t/subflow-env-variable-names-feature-request/58636 "2022-02-19T07:16:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [19 February 2022 07:16 UTC](https://discourse.nodered.org/t/subflow-env-variable-names-feature-request/58636/1 "2022-02-19T07:16:27Z")

</div>

Subflows have an option to have `$ENV` variables set and used.

But unless you read the documentation - and that it is correct - you may miss one.

An option to make required `$ENV` variable names shown by _Default_ when set.

So rather than having to remember the names **needed** , they are there and all you have to do is fill them in.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [19 February 2022 09:45 UTC](https://discourse.nodered.org/t/subflow-env-variable-names-feature-request/58636/2 "2022-02-19T09:45:11Z")

</div>

If you've added env var properties to a subflow template, then the edit dialog for any instance of that subflow will list them.

Can you explain a bit more on what you're suggesting? Perhaps a screenshot to show what and where you're wanting them to be listed.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [19 February 2022 20:03 UTC](https://discourse.nodered.org/t/subflow-env-variable-names-feature-request/58636/3 "2022-02-19T20:03:46Z")

</div>

Ok, that is strange/weird.

I am still at the shallow end of subflows, but am using them more and more.

I have just written another one and it has a lot of ENV variables that are needing to be set.

So this is the subflow when I open it up and look at the ENV part of the config.

Blank.

 ![Screenshot from 2022-02-20 07-02-06](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/3/23064a5a6def1fa9ad23883b7669016ed8177b45.png)

Is there a way that the variable names I need to be defined can be automatically put here?  
Or am I missing something - obvious?  
(I am good at missing elephants now and then)  
😉

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [19 February 2022 20:52 UTC](https://discourse.nodered.org/t/subflow-env-variable-names-feature-request/58636/4 "2022-02-19T20:52:03Z")

</div>

> [@Trying\_to\_learn](#):
>
> Is there a way that the variable names I need to be defined can be automatically put here?

[https://nodered.org/docs/user-guide/editor/workspace/subflows#properties](https://nodered.org/docs/user-guide/editor/workspace/subflows#properties)

1. Edit your subflow (click the 'edit subflow template' button in the screenshot you shared)
2. Click 'Edit properties' in the subflow toolbar to open up its edit dialog
3. In the first tab is where you can define Environment Variables. Anything you add to that list will then show up in the properties tab of any instance of the subflow.

Note that these do _not_ show up in the Env Var tab of the instance - they show up on the first Properties tab. The Env Var tab is where you can set additional ones that haven't been predefined for the subflow.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [19 February 2022 21:22 UTC](https://discourse.nodered.org/t/subflow-env-variable-names-feature-request/58636/5 "2022-02-19T21:22:10Z")

</div>

I am so sorry I missed that.

Thanks very much.

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:** [5 March 2022 21:22 UTC](https://discourse.nodered.org/t/subflow-env-variable-names-feature-request/58636/6 "2022-03-05T21:22:43Z")

</div>

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