# By Numeric entry field button should enable

**URL:** <https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 20, 2024, 2:12am UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828 "2024-11-20T02:12:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi\_Kumar\_Reddy](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Ravi\_Kumar\_Reddy](https://forum.inductiveautomation.com/u/Ravi_Kumar_Reddy)\
**Post date:** [November 20, 2024, 2:12am UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/1 "2024-11-20T02:12:16Z")

</div>

In numeric entry field, how to enable button, if i enter first character in numeric entry field then immediately button should be enabled

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [November 20, 2024, 2:29am UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/2 "2024-11-20T02:29:57Z")

</div>

What is your criteria for the value? Anything other than empty/0? You could make two custom properties on the view called `entryValue` and `enableButton`.

Bidirectionally bind the value of the entry field to `entryValue` and have an expression binding on `enableButton` that is something along the lines of `!isNull({self.custom.entryValue}) && {self.custom.entryValue} != 0`. Then bind your button's `enable` property to `enableButton`.

---

<div class="post-metadata">

**Author:** ![Ravi\_Kumar\_Reddy](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Ravi\_Kumar\_Reddy](https://forum.inductiveautomation.com/u/Ravi_Kumar_Reddy)\
**Post date:** [November 20, 2024, 12:46pm UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/3 "2024-11-20T12:46:17Z")

</div>

if their is value the button should be enabled and if empty it should be button disabled

---

<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:** [November 20, 2024, 1:05pm UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/4 "2024-11-20T13:05:23Z")

</div>

The numeric input field cannot do what you want, as it delivers its new value after some user action beyond just typing (enter, click outside, whatever).

The plain text field can do this with `.deferUpdates` set false, but you will have to handle text =\> number conversion yourself.

---

<div class="post-metadata">

**Author:** ![Ravi\_Kumar\_Reddy](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Ravi\_Kumar\_Reddy](https://forum.inductiveautomation.com/u/Ravi_Kumar_Reddy)\
**Post date:** [November 20, 2024, 1:12pm UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/5 "2024-11-20T13:12:02Z")

</div>

for text field i have made .deferUpdates to false and it is working but numeric field it is not working

---

<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:** [November 20, 2024, 1:12pm UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/6 "2024-11-20T13:12:43Z")

</div>

> [@Ravi\_Kumar\_Reddy](#):
>
> but numeric field it is not working

> [@pturmel](#):
>
> The numeric input field cannot do what you want

Right. It cannot--it doesn't have a `.deferUpdates` property.

---

<div class="post-metadata">

**Author:** ![Ravi\_Kumar\_Reddy](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Ravi\_Kumar\_Reddy](https://forum.inductiveautomation.com/u/Ravi_Kumar_Reddy)\
**Post date:** [November 20, 2024, 1:16pm UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/7 "2024-11-20T13:16:18Z")

</div>

yes for numeric entry field .deferUpdates property doesn't have, so how can i make it work in numeric field

---

<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:** [November 20, 2024, 1:17pm UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/8 "2024-11-20T13:17:44Z")

</div>

You _ **cannot** _. 🤷‍♂️

Use a text field. Convert that text to a number with an expression.

---

<div class="post-metadata">

**Author:** ![Ravi\_Kumar\_Reddy](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Ravi\_Kumar\_Reddy](https://forum.inductiveautomation.com/u/Ravi_Kumar_Reddy)\
**Post date:** [November 20, 2024, 1:19pm UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/9 "2024-11-20T13:19:08Z")

</div>

okay, Thanks

---

<div class="post-metadata">

**Author:** ![Ravi\_Kumar\_Reddy](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Ravi\_Kumar\_Reddy](https://forum.inductiveautomation.com/u/Ravi_Kumar_Reddy)\
**Post date:** [November 20, 2024, 1:33pm UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/10 "2024-11-20T13:33:38Z")

</div>

These is not working

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 20, 2024, 1:47pm UTC](https://forum.inductiveautomation.com/t/by-numeric-entry-field-button-should-enable/98828/11 "2024-11-20T13:47:05Z")

</div>

We are not mind-readers. Show us,

- what you have done
- what you expect
- what happened

See [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).
