# Number formatting in textboxes

**URL:** <https://forum.inductiveautomation.com/t/number-formatting-in-textboxes/10136>\
**Category:** Ignition\
**Created:** [June 16, 2015, 4:21pm UTC](https://forum.inductiveautomation.com/t/number-formatting-in-textboxes/10136 "2015-06-16T16:21:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gratliff](https://avatars.discourse-cdn.com/v4/letter/g/a5b964/32.png) [@Gratliff](https://forum.inductiveautomation.com/u/Gratliff)\
**Post date:** [June 16, 2015, 4:21pm UTC](https://forum.inductiveautomation.com/t/number-formatting-in-textboxes/10136/1 "2015-06-16T16:21:43Z")

</div>

I have a popup window with a textbox that is bound to a dataset via:

```auto
try({Root Container.Data}[toInt(0),"BadgeID"],"")
```

The dataset looks like this (1 row):

ID FirstName LastName Number Roll  
32 John Doe 3001 Engineer

This dataset is bound to a sql query. The “Number” field in the db is of type int.

The value that shows up in the textbox is 3,001.

How can i eliminate the comma from the number?

Version is 7.7.2

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 16, 2015, 4:33pm UTC](https://forum.inductiveautomation.com/t/number-formatting-in-textboxes/10136/2 "2015-06-16T16:33:15Z")

</div>

Two possibities:

1. Switch the component to the ‘numeric text field’, then remove the comma from the ‘decimalFormat’ property.
2. Wrap your expression with numberFormat(toInt(…), ‘0’) . The additional toInt() function is there because a dataset column expression doesn’t have a fixed datatype at the time of binding, and the numberFormat() function won’t accept the binding unless it knows for sure that it will receive a number as its first argument.
