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.

Regarding decimal field values population

Sirisha24
Tera Expert

Hi , 

I would like to know when i give decimal values in one field and there is another dependency field which populated based on first field.
For example, if i give 12 as value in first field then second value field should be * 1000 like 12000.
But when i give 1.2 it should be 1200 right but getting as 12000 

can anyone please help me how we can achieve this .

Thanks, 
Sirisha 

18 REPLIES 18

SAI VENKATESH
Kilo Patron
Kilo Patron

Hi @Sirisha24 

 

You need to use field type as decimal field.

SAIVENKATESH_0-1745931320524.png

Thanks and Regards

Sai Venkatesh

Hi Venkatesh , 
Thanks!!
Here previously used Floating point number type for that and i was not able to change the type for that field .
Is there any approach i can follow to achieve this ?


Hi @Sirisha24 

 

the only point is that if we use integer type or other type ServiceNow will not allow to show the outputs in decimals . We need to use correct data type to achieve these things.

 

 

Thanks and regards

Sai venkatesh

Hi Venkatesh , 

The actual requirement is: when a value like 10 is entered in the "Number of Days" field, the "NFI Cost" field should correctly calculate the cost based on the defined conditions (e.g., 10 × 1000 = 10000). Similarly, if the input is 2.5, the cost should be calculated as 2.5 × 1000 = 2500. However, the current behavior is incorrect—when entering 2.5, it is being treated as 25, resulting in a cost of 25000. This issue needs to be fixed so that decimal values are handled properly.

Thanks, 
Sirisha