Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to make a variable to be restricted like it should allow only 2 numbers after the .(dot) in the

Archana23
Tera Contributor

How to make a variable to be restricted like it should allow only 2 numbers after the .(dot) in the below screenshot

Please suggest.

 

Archana23_0-1734097787625.png

 

2 ACCEPTED SOLUTIONS

Ravi Chandra_K
Kilo Patron

Ashish Parab
Mega Sage

Hello @Archana23 ,

You can use below regex pattern: 

Regex^\d+(\.\d{1,2})?$

 

For implementing this, please refer below accepted thread:

https://www.servicenow.com/community/developer-forum/field-should-only-have-at-least-1-letter-and-1-...

 

Please mark this as "correct" and "helpful" if you feel this answer helped you in anyway.

 

Thanks and Regards,

Ashish

 

 

View solution in original post

2 REPLIES 2

Ravi Chandra_K
Kilo Patron

Ashish Parab
Mega Sage

Hello @Archana23 ,

You can use below regex pattern: 

Regex^\d+(\.\d{1,2})?$

 

For implementing this, please refer below accepted thread:

https://www.servicenow.com/community/developer-forum/field-should-only-have-at-least-1-letter-and-1-...

 

Please mark this as "correct" and "helpful" if you feel this answer helped you in anyway.

 

Thanks and Regards,

Ashish