can we show whole number with decimal places with 2 digits?

Ravish Shetty
Tera Guru

hi all,

we have a decimal field where we have whole numbers such as '100' or '200' which need to be displayed as '100.00' and '200.00' instead to maintain consistency with other fields.

 

also, these fields store dollar-cost information. is it better to convert them to currency fields? what are the cons to getting them converted?

 

Thanks,

Ravish

1 ACCEPTED SOLUTION

Ian Mildon
Tera Guru

You can use the following attribute in a script to set the value to 2 decimal place:

g_form.setValue('<target_field>', secsVal.toFixed(2));
 
I am using this to set a duration field to 2 decimal places via a variable I defined (secsVal)

View solution in original post

1 REPLY 1

Ian Mildon
Tera Guru

You can use the following attribute in a script to set the value to 2 decimal place:

g_form.setValue('<target_field>', secsVal.toFixed(2));
 
I am using this to set a duration field to 2 decimal places via a variable I defined (secsVal)