# How to handle showNumericKeypad() so the function runs immediately with the new value?

**URL:** <https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [October 17, 2025, 9:15am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543 "2025-10-17T09:15:56Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![javier.allueva1](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@javier.allueva1](https://forum.inductiveautomation.com/u/javier.allueva1)\
**Post date:** [October 17, 2025, 9:15am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/1 "2025-10-17T09:15:57Z")

</div>

**Problem description:**

In Ignition Vision 8.3, I have an `Int` input field bound to a tag.  
When I open the numeric keypad using `system.gui.showNumericKeypad(event.source.intValue)`,  
the **propertyChange** event fires using the _previous_ value, not the value entered on the keypad.

I have to input the number twice for my script (which calls a function) to execute correctly.

**Goal:**  
Trigger a function (e.g. `QuickFunctions.SelProdLineVATSelection(1)`) _immediately after_ a new number is entered using the keypad.

**What I’ve tried:**

- Handling logic inside `propertyChange` → sees old value.

- Handling logic inside `mousePressed` → keypad works, but value isn’t committed in time.

- Setting `event.source.intValue = newValue` manually — still doesn’t trigger propertyChange with updated value.

**Question:**  
What’s the correct or best-practice way in Vision to handle `showNumericKeypad()` so the function runs immediately with the _new_ value?

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [October 17, 2025, 9:33am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/2 "2025-10-17T09:33:27Z")

</div>

Could you do a tag change script instead?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 17, 2025, 3:09pm UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/3 "2025-10-17T15:09:49Z")

</div>

> [@javier.allueva1](#):
>
> Handling logic inside `propertyChange` → sees old value.

How, exactly, are you doing this? Can you post full code?

The `propertyChange` event is fired _many_ times (for each bindable property) so you **must** filter by which property is changing before you run any custom logic in your script.

---

<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:** [October 20, 2025, 5:02am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/4 "2025-10-20T05:02:36Z")

</div>

> [@paul-griffith](#):
>
> so you **must** filter by which property is changing before you run any custom logic

**Example:**

```python
# Change this property name to the name of the property that is expected to change
if event.propertyName == 'intValue':
	# nest all applicable logic here

```

---

<div class="post-metadata">

**Author:** ![javier.allueva1](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@javier.allueva1](https://forum.inductiveautomation.com/u/javier.allueva1)\
**Post date:** [October 20, 2025, 6:55am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/5 "2025-10-20T06:55:04Z")

</div>

Morning Paul, I am trying to do something like this in my input field:

```python
import system

logger = system.util.getLogger("\*\*\*\*\*\*\*\*")

try:
lineRunning = system.tag.readBlocking(\["\[default\]Global/Line1/Running"\])\[0\].value
if lineRunning == 0:
# Show keypad and capture user input
newValue = system.gui.showNumericKeypad(event.source.intValue)

    if newValue is not None and newValue > 0:
        # Update the field value (and bound tag, if bidirectional)
        event.source.intValue = newValue

        logger.info("User selected **********.".format(newValue))
        QuickFunctions. ******** (1)
    else:
        logger.info(" ******".format(newValue))
else:
    logger.info(" ********")

except Exception as e:
logger.error("\*\*\*\*\*\*\*\*\*\*\*\*))

```

---

<div class="post-metadata">

**Author:** ![javier.allueva1](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@javier.allueva1](https://forum.inductiveautomation.com/u/javier.allueva1)\
**Post date:** [October 20, 2025, 1:56pm UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/6 "2025-10-20T13:56:39Z")

</div>

> [@justinedwards.jle](#):
>
> `if event.propertyName == 'intValue':`

hi thanks I added this at the beggining of my code, I attached earlier, but still nothing happens I have added this line in the mouseClicked, event.source.intValue = system.gui.showNumericKeypad(event.source.intValue)  
becuase I need to call the numeric keypad first right? then when the property intValue changes I will run my code right? the problem is nothing happens , the keypad shows up, I enter the value but I get nothing after that

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 20, 2025, 3:18pm UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/7 "2025-10-20T15:18:13Z")

</div>

Step 0: Stop trusting LLM output for help with Ignition. LLMs are too broad spectrum to help with Ignition outside of **very** narrow bands, and they are absolutely not suitable if you don't already know how to guide them to success.

Step 1:  
Outline your requirement better. I could point out a handful of issues with your script, but this is an [XY problem](https://en.wikipedia.org/wiki/XY_problem) - you've already decided that you need to use `showNumericKeypad` and write to a tag and use a property change script, and I'm not sure that's actually what you need.

Again: LLMs **cannot be trusted**. If you ask an LLM to write code for you, it will happily do so, instead of telling you (as I, a human, am) - that you may not need or want to write **any code**. It's entirely possible you just need to set your project to touchscreen mode and use bidirectional bindings, for instance.

---

<div class="post-metadata">

**Author:** ![javier.allueva1](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@javier.allueva1](https://forum.inductiveautomation.com/u/javier.allueva1)\
**Post date:** [October 21, 2025, 6:35am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/8 "2025-10-21T06:35:08Z")

</div>

Morning Paul,

I got the project in Touch Screen mode enabled, I am transferring a SCADA app from Wonderware Intouch (the code I am familiar with) to Ignition, I am learning as I go so I am using everything I got to translate scripts and so on, LLMs speed up this process and I am totally aware they are not reliable but the save me a huge amount of time in translating big chunks of code.

The app is going to be use by PC users where they can access the app with keyboard and mouse but the app will also run in Tablets, so I am not entirely sure what is the best way to handle the inputs by the users, there are some input fields where I need the standard keyboard and others where I need the operator just to introduce a numeric number.  
At the moment, I am struggling to grasp the concept inside Ignition component scripts where for example I can have a mouseclick script working alongside a propertychange one.

I do apologize if this is basic stuff I should already know before posting, I am going through the videos in the Ignition University at the moment so I am trying to fill the gaps, with documentation on the website, videos, youtube, chatgpt, … and whatever I can use to get the job done.

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [October 21, 2025, 7:28am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/9 "2025-10-21T07:28:44Z")

</div>

> [@javier.allueva1](#):
>
> LLMs speed up this process

This is not true, as a beginner LLMs will burn huge amounts of time sending you down a rabbit hole you should have never been looking down and overcomplicating very simple tasks. You have illustrated this perfectly with your use case.

> [@javier.allueva1](#):
>
> The app is going to be use by PC users where they can access the app with keyboard and mouse but the app will also run in Tablets,

Using Vision for a tablet is not a great idea. Tablets vary in screen resolution wildly so it isn't a great option. Also the Perspective app is available for both Android and iPad and supports the onboard keyboard automatically.

Using Perspective for a fixed workstation may not be ideal either, but at least with Perspective you can build the interface once and have it work on both types of devices without rewriting the interface.

---

<div class="post-metadata">

**Author:** ![javier.allueva1](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@javier.allueva1](https://forum.inductiveautomation.com/u/javier.allueva1)\
**Post date:** [October 21, 2025, 8:00am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/10 "2025-10-21T08:00:14Z")

</div>

Morning David,

The idea with the tablets purchased will be to have the same screen resolution as the desktop application, so we were hoping to not have issues with that and be able to run the Vision app in both.

In InTouch, the keypads populated automatically adapt to a full keyboard or just a numeric pad when the tag behind it is an integer for example. I don’t think I can do that in Ignition, (if I am wrong on that assumption please correct me), so I was using to different commands to show the numeric or the regular screen keyboard.

If I have my project in Touch Screen enable, do I need to add these showNumericKeyPad to my input field MousePressed or MouseClick script at all?

the PropertyChange script I was expecting to run after the intValue was changed with the input of the user but it doesn’t seem to do anything, I have put logs in place to see if I could get any information in the console but I have no information back, so my assumption is that the propertyChange is not running at all after the script of the mouseClick has populated the keyboard and capture the data from the user.

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [October 21, 2025, 9:24am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/11 "2025-10-21T09:24:15Z")

</div>

If numeric entry on a touchscreen is your goal, why are you using scripting at all?

Use a numeric input component. It automatically displays a keypad. If you then need an action upon completion of the entry, use a tag change script, or a new value property change event on the numeric input component.

If you need the keypad only when line is running, bind the editable of the numeric input to that expression.

I too came from wonderware, and it’s much easier to do the equivalent actions in Ignition and without a lot of scripting.

---

<div class="post-metadata">

**Author:** ![javier.allueva1](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@javier.allueva1](https://forum.inductiveautomation.com/u/javier.allueva1)\
**Post date:** [October 21, 2025, 9:48am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/12 "2025-10-21T09:48:58Z")

</div>

Thank you Robertm, much appreciated, I have tried this:

the Enable option doesn’t quite work in the input field, still displays the keypad which I need to prevent the user for doing.

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [October 21, 2025, 10:11am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/13 "2025-10-21T10:11:42Z")

</div>

Sorry, editable field. This will prevent keypad. It will also allow you to change style to dim input box as notification that it’s not editable.

---

<div class="post-metadata">

**Author:** ![javier.allueva1](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@javier.allueva1](https://forum.inductiveautomation.com/u/javier.allueva1)\
**Post date:** [October 21, 2025, 10:25am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/14 "2025-10-21T10:25:59Z")

</div>

Thanks Robertm, this solved the issue with the input 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:** [October 21, 2025, 10:58am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/15 "2025-10-21T10:58:37Z")

</div>

Now you just need to stop using LLMs for Ignition work. (See also the rules in this forum's FAQ in that regard.)

Also:

> [@javier.allueva1](#):
>
> tablets purchased will be to have the same screen resolution as the desktop application, so we were hoping to not have issues with that and be able to run the Vision app in both

Vision does not run in iOS or Android.

---

<div class="post-metadata">

**Author:** ![javier.allueva1](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@javier.allueva1](https://forum.inductiveautomation.com/u/javier.allueva1)\
**Post date:** [October 21, 2025, 11:48am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/16 "2025-10-21T11:48:35Z")

</div>

thanks pturmel, I read the FAQ just now thanks for pointing that out, the tablets purchased run in Windows 11

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [October 21, 2025, 8:26pm UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/17 "2025-10-21T20:26:50Z")

</div>

> [@javier.allueva1](#):
>
> the tablets purchased run in Windows 11

That is a poor choice for a system for production, Windows updates and Copilot in the middle of the workday? Nope. Also no more local user accounts without online activation.

---

<div class="post-metadata">

**Author:** ![javier.allueva1](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@javier.allueva1](https://forum.inductiveautomation.com/u/javier.allueva1)\
**Post date:** [October 22, 2025, 6:22am UTC](https://forum.inductiveautomation.com/t/how-to-handle-shownumerickeypad-so-the-function-runs-immediately-with-the-new-value/111543/18 "2025-10-22T06:22:11Z")

</div>

Well this decision about the tablets and the decision to migrate to Ignition was done by the client, I am just the engineer to implement the conversion I am not sure who recommended this to the client, maybe a very persuasive sales person that doesn’t have to deal with the consequences 🙂
