cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

toString() is giving unexpected output

Akash_Srivastav
New Contributor II

A field is coming as a number from source and we want to convert it to string, but the output format is different for some records. Follwoing 4 records have WSH value of 0 but after toString(), out is โ€˜0โ€™ for 2 records and โ€˜0.0โ€™ for the other 2

image

2 REPLIES 2

tstack
Former Employee

You might want to use the toFixed() method. That will give you more control of what the resulting string looks like.

Thanks!!. it worked