web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Do not allow to input ...
Power Apps
Unanswered

Do not allow to input plus or minus sign to "Amount" field in Form (absolute values only)

(0) ShareShare
ReportReport
Posted on by 26

Hi Experts !

 

looking for solution to block some sign for Users in form.

I have a field "DataCardValue" which is for "Amount" input.

End users are adding "-" and "+" signs all the time, which messing up the report in Power BI, where we visualize data.

 

Is there any way to restrict that and let them only input numbers?

No special signs, no letters, just pure numbers (decimals).

 

I have no idea how to do that, just created a prompt which is "visible" when user input "-" or "+"sing.

But it does not work for end users, they still enter those signs, so I want to block that permanently for that one field alone.

 

Would be grateful for help/ advice on that 🙂

Patryk92_0-1674646448557.png

Patryk92_1-1674646478741.pngPatryk92_2-1674646491820.png

Patryk92_3-1674646680675.png

 

 

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Patryk92 ,

     

    You can use this condition to validate if the contents are numeric: 

     

    IsNumeric(DataCardValue9.Text)

     

    This condition can be used to, for instance, block the user from submitting the form and show a warning.

  • Patryk92 Profile Picture
    26 on at

    Hi !
    Thanks for answer on my query 🙂

     

    I tested what you suggested

    IsNumeric(DataCardValue9.Text)

    Patryk92_0-1674647799380.png

    just for the "warning label", and seems that this formula is evaluating "-1234" and "1234" and "+1234" as "true", so it does not work as expected 😞

    what is needed is to evaluate "-1234" and "+1234" as false, and only "1234" as true

    in this field characters (letters) are blocked anyway by the Property > Format = Number, but this does not block "-" and "+" from entering to that field

     

    Maybe there is a way to "clear" the field if it contains "-" or "+" sign or any other way to achieve that?
    Not sure about that... hmm

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Patryk92,

     

    Try this then:

     

    Set the Default property of the TextInput to:

     

    Coalesce(
     locNumber,
     Parent.Default
    )

     

     

    The insert a slider control with the below properties:

     

    Visible = false
    Default = Len(DataCardValue9.Text)
    OnChange = UpdateContext({locNumber:With({_Value:Trunc(DataCardValue9.Text)},If(_Value<0,_Value*-1,_Value))});
     Reset(TextInput5);

     

     

    What this does, is every time something is typed in the DataCardValue, the text is taken and manipulated:

    Value removes and "+",

    Trunc removes any ".",

    The If statement removes any "-"

     

    This is then saved in a local variable which is will be displayed be default in the DataCardValue because it is reset.

     

    The only thing to take into consideration is to set the local variable back to blank when the user submits the form (in the OnSuccess property of the form) or when the user navigates away from the screen. This is important because otherwise the DataCardValue may display a wrong value.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard