# Values from the dashboard to a node

**URL:** <https://discourse.nodered.org/t/values-from-the-dashboard-to-a-node/76904>\
**Category:** Developing Nodes\
**Created:** [24 March 2023 12:21 UTC](https://discourse.nodered.org/t/values-from-the-dashboard-to-a-node/76904 "2023-03-24T12:21:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kreindl123](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@Kreindl123](https://discourse.nodered.org/u/Kreindl123)\
**Post date:** [24 March 2023 12:21 UTC](https://discourse.nodered.org/t/values-from-the-dashboard-to-a-node/76904/1 "2023-03-24T12:21:54Z")

</div>

Hello,  
at first I have to say, that I have not so much experience with node-red. But I think someone can help me about my question.  
Currently I switch on/off a fan depending on the actual humidity with fix on/off values.  
I would like to change the on/off values on the dashboard.  
The flow looks like this:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/0/00801f040665198382f863c2c7619bb8af9e07c6.png)  
The function like this:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/f/9fa1d14b5f873a1d11c1aa066957c6def3815f92.png)

So now i would like to set the value "62" in the dashboard and not directly in the code.  
Is this possible?

Thanks

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [24 March 2023 12:52 UTC](https://discourse.nodered.org/t/values-from-the-dashboard-to-a-node/76904/2 "2023-03-24T12:52:19Z")

</div>

You could place a 'Slider' widget on your dashboard and send the slider-value to 'context' flow-variable.  
Then in your function node you could 'get' the flow-variable from 'context' and use it in your 'if-else' construct.

![slider](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/5/057582ec9b31cba82fda67cdd5ad6133d8287159.png)

![slider_dash](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/4/a4c899f8c6b37a6a65f35fa523fe16741f00f3e1.png)

```auto
[{"id":"c85ddfd9b2124e4a","type":"tab","label":"Flow 37","disabled":false,"info":"","env":[]},{"id":"621917ccd2dff99f","type":"ui_slider","z":"c85ddfd9b2124e4a","name":"","label":"Humidity","tooltip":"","group":"4045eb716a4077f5","order":0,"width":"1","height":"6","passthru":true,"outs":"end","topic":"topic","topicType":"msg","min":0,"max":"100","step":1,"className":"","x":270,"y":200,"wires":[["6f7acfa33ad6d7ee"]]},{"id":"6f7acfa33ad6d7ee","type":"change","z":"c85ddfd9b2124e4a","name":"","rules":[{"t":"set","p":"humidity","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":200,"wires":[[]]},{"id":"4045eb716a4077f5","type":"ui_group","name":"Default","tab":"bf43de97.2470a8","order":5,"disp":true,"width":"6","collapse":false,"className":""},{"id":"bf43de97.2470a8","type":"ui_tab","name":"Owntracks","icon":"dashboard","order":1}]

```

Note: I've shown the orientation of the slider as vertical, you can alter it to horizontal (to save space).

![slider_horz](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f0bf74bae50ebe51eb16207785e1339096aa6cf0.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:** [23 May 2023 12:53 UTC](https://discourse.nodered.org/t/values-from-the-dashboard-to-a-node/76904/3 "2023-05-23T12:53:06Z")

</div>

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