# Allow user-defined node properties on subflows?

**URL:** <https://discourse.nodered.org/t/allow-user-defined-node-properties-on-subflows/2705>\
**Category:** Feature Requests\
**Created:** [30 August 2018 14:43 UTC](https://discourse.nodered.org/t/allow-user-defined-node-properties-on-subflows/2705 "2018-08-30T14:43:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [30 August 2018 14:43 UTC](https://discourse.nodered.org/t/allow-user-defined-node-properties-on-subflows/2705/1 "2018-08-30T14:43:43Z")

</div>

I was wondering if it's on the roadmap the ability to define custom node properties on subflows?

Ideally I'd like to be able to add a configuration to my subflows so that they behave like the custom nodes.

For instance, I should be able to define a "foo" property when I position a subflow on my flow, that will allow me to set the "foo" flow-context variable in the subflow, so that I can use that variable in my subflow logic.

It should allow to define the value of the custom properties reading it from the flow, msg or global, or any custom string, number etc.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [30 August 2018 15:21 UTC](https://discourse.nodered.org/t/allow-user-defined-node-properties-on-subflows/2705/2 "2018-08-30T15:21:48Z")

</div>

Can you come up with a specific use case that this would address?

---

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [30 August 2018 15:43 UTC](https://discourse.nodered.org/t/allow-user-defined-node-properties-on-subflows/2705/3 "2018-08-30T15:43:25Z")

</div>

For instance I have a "Flux Toggle" subflow that handles the logic needed to toggle some lights state, but to provide it the entity (bulb) I want to turn on/off I need to make it read the `msg` object with a pre-defined property (`payload` usually), this means that I have to edit my Flow to alter the payload value when I call the subflow and then restore the previous payload after the subflow returns.

Basically I'd like the subflows to behave like the custom nodes, this could even allow to share in the "palettes" listing custom subflows that could be fully encapsulated.

---

<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:** [30 August 2018 15:44 UTC](https://discourse.nodered.org/t/allow-user-defined-node-properties-on-subflows/2705/4 "2018-08-30T15:44:09Z")

</div>

Yes.

Subflow Instance Properties are a key item on our [Roadmap to 1.0](https://nodered.org/blog/2017/07/17/roadmap-to-1-dot-0)

Trello Item - [https://trello.com/c/Rs5752Ba](https://trello.com/c/Rs5752Ba) - including links to the relevant design notes on the wiki.

Nick

---

<div class="post-metadata">

**Author:** ![FezVrasta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fezvrasta/32/2182_2.png) [@FezVrasta](https://discourse.nodered.org/u/FezVrasta)\
**Post date:** [30 August 2018 15:48 UTC](https://discourse.nodered.org/t/allow-user-defined-node-properties-on-subflows/2705/5 "2018-08-30T15:48:50Z")

</div>

Thanks @knolleary! That's great
