Hi all,
I am having an issue where I need to be able to prevent a user from inputting a decimal "." inside of a DataCardValue input on a form within PApps
I have tried the Text(Value(Parent.Default), "[$-en-US]#") formula. However that only changes the number that they inputted after the form is saved. I need to be able to prevent the user from inputting a decimal place at all. Or at the very least show a flag that warns that a decimal place was entered.
Any feedback will be very helpful.
Thanks!
Solved! Go to Solution.
Hi @swan_soup ,
Do you want to prevent user to input decimal?
You can consider the following woraround,I test as next:
Add one textinput control and TextInput1.OnChnage:If(Value(TextInput1.Text)/Value(RoundDown(Value(TextInput1.Text),0))<>1, Notify("No need decimal,please try again!",NotificationType.Error);Reset(TextInput1)) (I use rounddown to test, you can consider use round or roundup based on your situation)
test:
Hope this could be helpful.
Best Regards.
Yumia
Hi @swan_soup ,
Do you want to prevent user to input decimal?
You can consider the following woraround,I test as next:
Add one textinput control and TextInput1.OnChnage:If(Value(TextInput1.Text)/Value(RoundDown(Value(TextInput1.Text),0))<>1, Notify("No need decimal,please try again!",NotificationType.Error);Reset(TextInput1)) (I use rounddown to test, you can consider use round or roundup based on your situation)
test:
Hope this could be helpful.
Best Regards.
Yumia
Hey Yumia,
That worked perfectly!
Thank you so much.
-swan
Hi,
How to restrict upto 4 decimals. The text box should not accept beyond 4 decimals while entering.
Can you help me.
Thank you in advance.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
207 | |
187 | |
82 | |
54 | |
37 |
User | Count |
---|---|
288 | |
245 | |
119 | |
78 | |
55 |