cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
samuelJ
Level 8

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
samuelJ
Level 8

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
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."

Dual Super User
Dual Super User

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!

samuelJ
Level 8

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.  

samuelJ
Level 8

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 😞 

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.
samuelJ
Level 8

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

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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,784)