cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
addy2019
Advocate IV
Advocate IV

I cannot type in text in numerical field but i can copy paste it

Hi,

 

I have a number field where I cannot type in any text ($ or ,), which is an expected behavior, but I'm able to copy past $ & comma from Excel which is not expected. Anyone know the reason of it & how this unexpected behavior be fixed?

14 REPLIES 14
v-qiaqi-msft
Community Support
Community Support

Hi@addy2019,

Could you please tell me that:

  1. what is your data source, Excel table?
  2. do you use a TextInput control to type in?

I assume that there is a TextInput within your App and you want to only allow the number to be typed in.

I have a test on my side, please take a try as below.

Add a TextInput and set the Format property as "Number".

After this, as long as the data is not number, you can't successfully copy and paste it into the TextInput.

Hope this could help, if this could not, please provide more details.

 

Best Regards,

Qi

Best Regards,
Qi

Its already a number format type (see screenshot) still I can copy paste text ($ ,) from Excel (screenshot)

image.pngimage.pngimage.png

PowerAddict
Super User
Super User

I believe $ and % are two characters that are allowed for the number format as they technically pertain to numbers. You can simply use Value(TextInput4.Text) to get the numeric value. For example for $189,100.00, the Value will be 189100 and for 80% the Value will be 0.8. Also, it will let you type in $ and % (so it isn't that only copying and pasting allows those values). 

Let me know if this helps. 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

I cannot type in $ or comma but I can copy paste it. Any reason for that? You are right value that monetary value is basically a number formatted as currency

PowerAddict
Super User
Super User

You are right, only % can be typed in the rest cannot be. But it does let you paste them in. It doesn't however let you paste in any other text. That being said, if you use the Value function, it shouldn't affect how the value is stored, if that's one of your concerns. 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Yes the value is getting saved as a number only. Problem is that we don't want to give users an impression that they can enter currency symbol in the amount field as there's a separate field for selecting currency. Only way left is for me to add a validation in OnChange property but I don't find that very clean approach.

 

I wish TextInput should not allow copy pasting any text which we cannot type-in. I think its a bug.

PowerAddict
Super User
Super User

Here's another twist - if you type in $123, it won't let you do that. BUT, if you type in 123 and then go to the beginning and type in $, it lets you do it. 

Here's that behavior in action. 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

this is so frustrating.....they should either allow it or don't allow it, why so confusing behavior. Or they can create a separate format type as 'Currency' & don't allow any text in Number field (type, paste or pre-fix)

addy2019
Advocate IV
Advocate IV

I have added two ideas one to fix this bug & another for having a separate currency Format Type for Text Input control. Please Vote if you feel these should be implemented

 

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Fix-TextInput-control-strange-behavior-for-Curr...

 

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Add-a-Format-Type-Currency-for-TextInput-Contro...

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,468)