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 / How to check a value i...
Power Apps
Answered

How to check a value is decimal?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to display an error for if there is decimal value in a textbox. How do I do that?

Categories:
  • Verified answer
    Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @Anonymous 

    You can use the Mod function, which will give you the remainder. Then see to it that if the remainder is greater than zero, that means it has a decimal. 

     

    Mod(YourNumberHere,1)>0

     

    The code above will give you true if there is a decimal value and false if there is not.

    More info:
    Power Apps – Split Decimal and Whole Number 

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Just set the OnChange property of the TextInput as below:

    If(Value(TextInput5.Text) <> RoundDown(Value(TextInput5.Text),0),Notify("No decimals!",Error))

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard