I have a data card field that I have set to Format: TextFormat.Number
However, when testing this it works perfect for preventing users inputting strings but if they enter negative(-12) or decimal (2.4)
it still work.
For this field I need the input to be whole number only. How may I check and then round the decimals or trim the - symbol?
I can make warning signs and don't let them press submit. But I would really prefer to limit what can be typed in.
Solved! Go to Solution.
@miss_haley
You have to make 'warning signs' as you mentioned. There's no way to prevent typing a valid number.
You can restrict input values by using another control type like a pre-defined dropdown of numbers or a Slider control.
---
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."
@miss_haley
You have to make 'warning signs' as you mentioned. There's no way to prevent typing a valid number.
You can restrict input values by using another control type like a pre-defined dropdown of numbers or a Slider control.
---
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."
to check for negative and show error I can type
If(Value(TextInput1.Text) < 0)
Would you know how I can check for the decimal?
I dont know how I can check if "." exist in the textinput
@miss_haley
I think you can check for a decimal like this
Mod(your_number_here, 1)<>0
---
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."
Thanks for reply, I use the IsMatch function and look for decimal as a regex pattern it work.
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
279 | |
236 | |
84 | |
37 | |
35 |
User | Count |
---|---|
356 | |
240 | |
130 | |
71 | |
51 |