# Get value as type and fire an event

**URL:** <https://forum.inductiveautomation.com/t/get-value-as-type-and-fire-an-event/26570>\
**Category:** Ignition\
**Tags:** ignition78, ignition79, scripting\
**Created:** [July 16, 2019, 8:09am UTC](https://forum.inductiveautomation.com/t/get-value-as-type-and-fire-an-event/26570 "2019-07-16T08:09:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarun89engg](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@tarun89engg](https://forum.inductiveautomation.com/u/tarun89engg)\
**Post date:** [July 16, 2019, 8:09am UTC](https://forum.inductiveautomation.com/t/get-value-as-type-and-fire-an-event/26570/1 "2019-07-16T08:09:55Z")

</div>

What i am trying to achieve is when a User type a numeric value in field i would like to fire an event when the length of input filed is more than 4

I have tried the keypressed , Keyreleased but no luck.

It works only when i press enter when the length of input field is 4.

How i can achieve this.

Thanks for any helps.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 16, 2019, 11:57am UTC](https://forum.inductiveautomation.com/t/get-value-as-type-and-fire-an-event/26570/2 "2019-07-16T11:57:07Z")

</div>

Sounds like you have the Defer Updates property of the component set to true. This keeps the value properties from firing updates while the user is typing, waiting until Enter is pressed.

---

<div class="post-metadata">

**Author:** ![tarun89engg](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@tarun89engg](https://forum.inductiveautomation.com/u/tarun89engg)\
**Post date:** [July 16, 2019, 12:15pm UTC](https://forum.inductiveautomation.com/t/get-value-as-type-and-fire-an-event/26570/3 "2019-07-16T12:15:31Z")

</div>

Thanks for the input. it solves my problem.
