# Ways to not allow decimal entry on numeric entry field

**URL:** <https://forum.inductiveautomation.com/t/ways-to-not-allow-decimal-entry-on-numeric-entry-field/98399>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 8, 2024, 5:31pm UTC](https://forum.inductiveautomation.com/t/ways-to-not-allow-decimal-entry-on-numeric-entry-field/98399 "2024-11-08T17:31:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkhoshroo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pkhoshroo/32/26801_2.png) [@pkhoshroo](https://forum.inductiveautomation.com/u/pkhoshroo)\
**Post date:** [November 8, 2024, 5:31pm UTC](https://forum.inductiveautomation.com/t/ways-to-not-allow-decimal-entry-on-numeric-entry-field/98399/1 "2024-11-08T17:31:32Z")

</div>

Hello everyone,

Is there a way to not allow decimal entry on numeric entry field?  
I already know about format which is used to show the value with decimal or as integer, etc., but I am looking for a way to just eliminate entering decimals into my numeric field.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/8/889a2a8ef7b77f1b2c11ba6d764de1ccdf218c78.png)

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [November 8, 2024, 6:03pm UTC](https://forum.inductiveautomation.com/t/ways-to-not-allow-decimal-entry-on-numeric-entry-field/98399/2 "2024-11-08T18:03:13Z")

</div>

You can add a change script and cast it to int.

```python
self.props.value = int(self.props.value)

```

You could also focus on something else on a keyDown event.

```python
	if event.key == '.':
		self.getSibling("Table_2").focus()

```
