cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Responsive Resident
Responsive Resident

OnChange() of a textInput doesn't work when enter alpha character when format is a number

Hi,

 

I have a Text Input object.  The "format" field is set to Number.  If I am in the Text Input and at any time I push a non numeric key, then I step out of the Text Input, the OnChange() function does not trigger.  The alpha character is not entered in the Text Input (As expected) but its like pushing the alpha character stops the OnChange() from triggering. 

 

Is this intended?  Is there a way around this?  Words of Wisdom?  Thanks.  

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Responsive Resident
Responsive Resident

Re: OnChange() of a textInput doesn't work when enter alpha character when format is a number

@mdevaney I appreciate the help.  Sorry about that I didn't catch that you entered letters, it appeared and disappeared so quickly.  

 

So I think this is somewhat resolved.  Up to now I have only tried the app in Edit mode and never play mode.  If I use the app in Play mode it works as expected...

 

I will mark this as resolved, thanks again for the help.  

View solution in original post

7 REPLIES 7
Highlighted
Super User
Super User

Re: OnChange() of a textInput doesn't work when enter alpha character when format is a number

@samuelJ 

I was not able to replicate your situation.  My OnChange triggered perfectly after attempting to enter numbers into the Text Input.  My format was set to Number just like yours.

 

Are there any other details you can supply that would help me to make an identical app?  Some code perhaps?

 

What happens if you save and republish the app?

 

OnChangeTest.gif

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Dual Super User III
Dual Super User III

Re: OnChange() of a textInput doesn't work when enter alpha character when format is a number

Hi @samuelJ 

 

I think that this might be a caching issue. Can you try to logout of the browser, clear the cache and login again? You can also confirm the behavior in a different browser.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Responsive Resident
Responsive Resident

Re: OnChange() of a textInput doesn't work when enter alpha character when format is a number

@mdevaney Sorry I think there was a miscommunication on my part.  If the text input is set to Numbers, you'll need to enter in numbers and characters.  For example the tring "123P" or "-4-".  On my side then it will not trigger the OnChange() if the text input is set to Numbers.  

Highlighted
Responsive Resident
Responsive Resident

Re: OnChange() of a textInput doesn't work when enter alpha character when format is a number

@yashag2255 I tried on Google Chrome and Microsoft Edge.  All provided the same output 😞 

Highlighted
Super User
Super User

Re: OnChange() of a textInput doesn't work when enter alpha character when format is a number

@samuelJ
Actually, I did try to do that... My GIF shows two tests:

#1 I entered 123456 into the field and OnChange was triggered. This was done to prove it was working for only numbers

#2 I tried to enter 123abcde but the letters won’t show due to the text input having a format property of number. Even though I entered non-numeric characters OnChange still triggers.

I am curious why your text input would allow you to input letters and special characters if the format is set to number...

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Highlighted
Responsive Resident
Responsive Resident

Re: OnChange() of a textInput doesn't work when enter alpha character when format is a number

@mdevaney I appreciate the help.  Sorry about that I didn't catch that you entered letters, it appeared and disappeared so quickly.  

 

So I think this is somewhat resolved.  Up to now I have only tried the app in Edit mode and never play mode.  If I use the app in Play mode it works as expected...

 

I will mark this as resolved, thanks again for the help.  

View solution in original post

Highlighted
Super User
Super User

Re: OnChange() of a textInput doesn't work when enter alpha character when format is a number

@samuelJ
Very weird that Edit and Play mode would behave differently in this case.

I’m glad you found a workaround. Best of luck in building your app!

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,597)