# How to make variable limits

**URL:** <https://discourse.nodered.org/t/how-to-make-variable-limits/2363>\
**Category:** Dashboard\
**Created:** [17 August 2018 12:01 UTC](https://discourse.nodered.org/t/how-to-make-variable-limits/2363 "2018-08-17T12:01:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andres](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andres/32/112_2.png) [@Andres](https://discourse.nodered.org/u/Andres)\
**Post date:** [17 August 2018 12:01 UTC](https://discourse.nodered.org/t/how-to-make-variable-limits/2363/1 "2018-08-17T12:01:02Z")

</div>

Hi everyone, i'm trying to make that the gauge varies the max limit (with something like a message property), is this possible?

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [17 August 2018 12:15 UTC](https://discourse.nodered.org/t/how-to-make-variable-limits/2363/2 "2018-08-17T12:15:44Z")

</div>

Absolutely 🙂

```auto
var max = 50;
var min = 20;
var data = 30;
msg = {payload:data,ui_control:{min:min,max:max}}
return msg;
```

---

<div class="post-metadata">

**Author:** ![Andres](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andres/32/112_2.png) [@Andres](https://discourse.nodered.org/u/Andres)\
**Post date:** [17 August 2018 12:31 UTC](https://discourse.nodered.org/t/how-to-make-variable-limits/2363/3 "2018-08-17T12:31:09Z")

</div>

@hotNipi Thank you very much sir! that was exactly what i was looking for!
