Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to allow numbers and decimals in string

pramodkumar
Tera Expert

Hi All,

How can we create regex to allow numbers and decimals in string variable.

For ex: 1234, 12334.89

 

 

Thanks!

5 REPLIES 5

Sayali Gurav
Kilo Sage

Hello @pramodkumar ,

- Open your variable 

- In tabs section click on Type Specifications tab

- In Type Specifications tab click on Validation Regex choices values and select Number.

- Save

SayaliGurav_0-1697459616457.png

 

SayaliGurav_2-1697459784886.png

 

Mark helpful or correct if applicable.

Thanks & Regards,

Sayali Gurav