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 Apps
Answered

ISmatch decimal

(0) ShareShare
ReportReport
Posted on by 11

I got stucked with Ismatch function.

if users txt value is ( two or one digit before and after decimal value) i.e

0.50 or 0.5 or 1.50 or 1.5 then required field is YES else NO

i tried to use ismatch function

IsMatch(dcamount.Text,"\d+(.\d\d)" ) Or IsMatch(dcamount.Text,"\d+(.\d)" ) Or IsMatch(dcamount.Text,"\d\d+(.\d\d)" ) Or IsMatch(dcamount.Text,"\d\d+(.\d)" )

 

but this is not working as i expected.

it shows required field yes, if value is 111 (Three or more digit).

Any help/tips?

Categories:
  • dinusc Profile Picture
    Microsoft Employee on at

    Hello @jagaran,

    The issue is that you allow "." any times. Example based on the nn.nn formula:

    "\d\d+(.\d\d)"

    should be

    "(\d\d)+\.(\d\d)"

  • jagaran Profile Picture
    11 on at

    @dinusc

    Thanks for your reply. I tried your suggestion but still i get

    required field yes and now for two digit figure i.e 11

     

    IsMatch(dcamount.Text,"\d+(.\d\d)" ) Or IsMatch(dcamount.Text,"\d+(.\d)" ) Or IsMatch(dcamount.Text,"(\d\d)+\.(\d\d)" ) Or IsMatch(dcamount.Text,"\d\d+(.\d)" )Or IsMatch(dcamount.Text,"(.\d)" ) Or IsMatch(dcamount.Text,"(.\d\d)" )

     

    above formula works for

    1.1

    11.11

    .1

    .11

    and it works for 11 too which i don't want.

    it should only with decimal value

  • Verified answer
    jagaran Profile Picture
    11 on at

    Finally

    this wokred

     

     IsMatch(dcamount.Text,"(\d\d)+\.(\d\d)" ) Or IsMatch(dcamount.Text,"(\d)+\.(\d\d)" ) Or IsMatch(dcamount.Text,"(\d\d)+\.(\d)" ) Or IsMatch(dcamount.Text,"(\d)+\.(\d)" ) Or IsMatch(dcamount.Text,"\.(\d)" ) Or IsMatch(dcamount.Text,"\.(\d\d)" )

     

    Thanks @dinusc for your tips..

  • dinusc Profile Picture
    Microsoft Employee on at

    As mentioned, my example was only for the NN.NN case. Just did not want to repeat the same idea 4 times. I'm glad you got it working.

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

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard