# How to setup MSSQL connection fields from function node / outside the node?

**URL:** <https://discourse.nodered.org/t/how-to-setup-mssql-connection-fields-from-function-node-outside-the-node/26468>\
**Category:** General\
**Created:** [11 May 2020 08:37 UTC](https://discourse.nodered.org/t/how-to-setup-mssql-connection-fields-from-function-node-outside-the-node/26468 "2020-05-11T08:37:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jude.Robise](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jude.robise/32/13970_2.png) [@Jude.Robise](https://discourse.nodered.org/u/Jude.Robise)\
**Post date:** [11 May 2020 08:37 UTC](https://discourse.nodered.org/t/how-to-setup-mssql-connection-fields-from-function-node-outside-the-node/26468/1 "2020-05-11T08:37:01Z")

</div>

Basically I want to access SQL node each fields from dashboard to enter data. Therefore is it possible to access those fields from outside the SQL node ?

eg: accessing name from function node like "msg.name".

any help would be really appreciated 🙂

please see the image  
 ![sgfsgs](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/6/36fbce26ae223f62247cda0287389241f35b29fb.jpeg)

---

<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:** [11 May 2020 08:52 UTC](https://discourse.nodered.org/t/how-to-setup-mssql-connection-fields-from-function-node-outside-the-node/26468/2 "2020-05-11T08:52:09Z")

</div>

It is not possible to dynamically set a connection from dashboard or messages. The connection is a shared config object setup at design time.

However, if you are using `node-red-contrib-mssql-plus` you can use environment variables for those fields.

---

<div class="post-metadata">

**Author:** ![Jude.Robise](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jude.robise/32/13970_2.png) [@Jude.Robise](https://discourse.nodered.org/u/Jude.Robise)\
**Post date:** [11 May 2020 09:12 UTC](https://discourse.nodered.org/t/how-to-setup-mssql-connection-fields-from-function-node-outside-the-node/26468/3 "2020-05-11T09:12:48Z")

</div>

Oh okay. I will try with that. Thanks for the reply as well as the solution.

-Jude

---

<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:** [11 May 2020 09:35 UTC](https://discourse.nodered.org/t/how-to-setup-mssql-connection-fields-from-function-node-outside-the-node/26468/4 "2020-05-11T09:35:50Z")

</div>

note - environment variables are only evaluated at deploy time - so you have to restart Node-RED to reload any changes.

---

<div class="post-metadata">

**Author:** ![Jude.Robise](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jude.robise/32/13970_2.png) [@Jude.Robise](https://discourse.nodered.org/u/Jude.Robise)\
**Post date:** [13 May 2020 01:28 UTC](https://discourse.nodered.org/t/how-to-setup-mssql-connection-fields-from-function-node-outside-the-node/26468/5 "2020-05-13T01:28:07Z")

</div>

okay thank you.

---

<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:** [27 May 2020 01:28 UTC](https://discourse.nodered.org/t/how-to-setup-mssql-connection-fields-from-function-node-outside-the-node/26468/6 "2020-05-27T01:28:08Z")

</div>

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