# Number precision (Decimal Places) in Dashboard ui\_numeric

**URL:** https://discourse.nodered.org/t/number-precision-decimal-places-in-dashboard-ui-numeric/76563
**Category:** Dashboard
**Created:** [14 March 2023 18:12 UTC](https://discourse.nodered.org/t/number-precision-decimal-places-in-dashboard-ui-numeric/76563 "2023-03-14T18:12:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jmtkelly](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jmtkelly](https://discourse.nodered.org/u/jmtkelly)
#### Post date: [14 March 2023 18:12 UTC](https://discourse.nodered.org/t/number-precision-decimal-places-in-dashboard-ui-numeric/76563/1 "2023-03-14T18:12:29Z")

</div>

I am using a ui\_numeric node on a node-red dashboard to allow a user to  
enter a number. The number should have two decimal places of precision.  
I was at first using the Value Format {{value | number:2}}. This would only allow  
the use to enter the number via up and down arrows which was painful. I did some  
reading and found that if I used {{msg.payload}} instead of value, then the user could  
use the arrow OR just type in a number. I put the following in then for Value Format {{msg.payload | number:2}}. The precision is not working when I use msg.payload but does work when I use value.  
Is there a way around this? I tried changing the step level from 0.1 to 0.01 which worked for values  
like 1.81 however 1.80 would be displayed as "1.8" dropping a decimal place.

---

<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: [13 April 2023 18:12 UTC](https://discourse.nodered.org/t/number-precision-decimal-places-in-dashboard-ui-numeric/76563/2 "2023-04-13T18:12:56Z")

</div>

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