Insert string value to a field of type decimal

JPSS
Tera Contributor

Hi,

 

Can we instert string value to an out of the box field of type decimal.

 

 

6 REPLIES 6

Sandeep Rajput
Tera Patron
Tera Patron

@JPSS What is the use case here? Decimal field can't store a string value.

@Sandeep Rajput  in the interaction table we have a field called customer satisfaction score which is OOBT of field type decimal. Want to resuse the field to store survey result as "Good","Neutral","Bad".

@JPSS I recommend creating a separate field for this purpose. As decimal field can't store the string value. 

Community Alums
Not applicable

Hi @JPSS ,

 

You cannot directly store a string value in a field of type decimal in ServiceNow. The decimal field type is specifically designed to store numeric values with decimal precision, and it will not accept string inputs.

See the below screenshot from servicenow docs-

SanjayG_0-1720910237793.png

https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/administer/reference-pa...

 

However, as suggested by Sandeep, if you want to store survey results then you should use a different field type, such as a string field or a choice list, that is designed to hold such values.

 

If my response has resolved your query, please consider giving it a thumbs up ‌‌ and marking it as the correct answer‌‌!


Thanks & Regards,

Sanjay Kumar