# On Click int numeric entry displays decimal

**URL:** <https://forum.inductiveautomation.com/t/on-click-int-numeric-entry-displays-decimal/71952>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 3, 2023, 5:30am UTC](https://forum.inductiveautomation.com/t/on-click-int-numeric-entry-displays-decimal/71952 "2023-04-03T05:30:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KAVINAYA\_L](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@KAVINAYA\_L](https://forum.inductiveautomation.com/u/KAVINAYA_L)\
**Post date:** [April 3, 2023, 5:30am UTC](https://forum.inductiveautomation.com/t/on-click-int-numeric-entry-displays-decimal/71952/1 "2023-04-03T05:30:26Z")

</div>

I have a numeric entry field that needs to only accept whole numbers without decimal values. I have selected the format (0,0), but when I click on the numeric field, it displays decimal values.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/f/ef20c780c876c50d7127b0c77ab9d38f2d68b7ab.png)  
after click the numeric entry filed  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/1/617abb0f0a5a10da6db23763f10373630e0f3bb1.png)

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [April 3, 2023, 6:16am UTC](https://forum.inductiveautomation.com/t/on-click-int-numeric-entry-displays-decimal/71952/2 "2023-04-03T06:16:30Z")

</div>

One approach to ensure the value is always an integer would be to add a change script to the value property:

```auto
#def valueChanged(self, previousValue, currentValue, origin, missedEvents):
	from org.python.core import PyInteger
	if not isinstance(currentValue.value, PyInteger):
		self.props.value = int(currentValue.value)

```

I would also set the spinner increment to an integer (Probably 1)
