# Ui\_numeric and msg.enable

**URL:** <https://discourse.nodered.org/t/ui-numeric-and-msg-enable/64514>\
**Category:** Dashboard\
**Created:** [29 June 2022 19:11 UTC](https://discourse.nodered.org/t/ui-numeric-and-msg-enable/64514 "2022-06-29T19:11:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon01011](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Simon01011](https://discourse.nodered.org/u/Simon01011)\
**Post date:** [29 June 2022 19:11 UTC](https://discourse.nodered.org/t/ui-numeric-and-msg-enable/64514/1 "2022-06-29T19:11:07Z")

</div>

Hi everybody!

I found a problem in my flow: I want to enable/disabe some controls. It works fine for buttons but not for numeric inputs. If I send a  
`msg.enable = false`  
to a button, it gets greyed out. If I do the same with a ui\_numeric, it gets greyed out as well. But at the same time the value is set to 0. This is undesired for me.

I found the same description in a post 3 years ago: [Numeric input state](https://discourse.nodered.org/t/numeric-input-state/7204)

I wonder if there is a way to get that working, does anybody have a hint for me? Thanks!

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [29 June 2022 19:54 UTC](https://discourse.nodered.org/t/ui-numeric-and-msg-enable/64514/2 "2022-06-29T19:54:15Z")

</div>

If you feed a msg.payload with the numeric value you wish displayed along with msg.enabled, it should display that number.  
e.g.

```auto
[{"id":"3a9e8077.c2e1c","type":"inject","z":"bf9e1e33.030598","name":"disable with payload","props":[{"p":"payload"},{"p":"enabled","v":"false","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"6","payloadType":"num","x":150,"y":60,"wires":[["49895e9d.c6fb9"]]},{"id":"49895e9d.c6fb9","type":"ui_numeric","z":"bf9e1e33.030598","name":"","label":"numeric","tooltip":"","group":"2d4fe667.28f8ba","order":9,"width":0,"height":0,"wrap":false,"passthru":false,"topic":"topic","topicType":"msg","format":"{{value}}","min":0,"max":10,"step":1,"className":"","x":380,"y":100,"wires":[["9efd2c72.cb6e88"]]},{"id":"bd84e114.515c88","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"enabled","v":"true","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":140,"y":140,"wires":[["49895e9d.c6fb9"]]},{"id":"9efd2c72.cb6e88","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":620,"y":100,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":1,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<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:** [29 July 2022 19:55 UTC](https://discourse.nodered.org/t/ui-numeric-and-msg-enable/64514/4 "2022-07-29T19:55:42Z")

</div>

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