# How to set the Function in Flow or Globally

**URL:** <https://discourse.nodered.org/t/how-to-set-the-function-in-flow-or-globally/12917>\
**Category:** General\
**Created:** [4 July 2019 15:56 UTC](https://discourse.nodered.org/t/how-to-set-the-function-in-flow-or-globally/12917 "2019-07-04T15:56:23Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [4 July 2019 16:40 UTC](https://discourse.nodered.org/t/how-to-set-the-function-in-flow-or-globally/12917/4 "2019-07-04T16:40:57Z")

</div>

I have in the past stored function object(s) in flow/global but that means mostly using function nodes to access them.

No Biggie but not exactly the "node-red way" (imo).

You could of course make a multifunctional subflow and use properties of msg for parameters and `msg.topic` as the function name.  
Just be sure to use the self documenting features of the subnode to remind you how it works.

---

_[View the full topic](https://discourse.nodered.org/t/how-to-set-the-function-in-flow-or-globally/12917)._
