Decimal type field does not show decimal value.

Vaishnavi35
Tera Guru

Hi,

I have a decimal field Payback period but it does not show decimal value.

find_real_file.png

19350/252 = 77.4 but it shows only 77.

Client script for that is,

find_real_file.png

Thanks,

Vaishnavi

1 ACCEPTED SOLUTION

script i have tested on my personal instance and worked. 

function onSubmit() {
	//Type appropriate comment here, and begin script below
	var currency_amount = g_form.getIntValue('total_costs');

	var currency_code = g_form.getIntValue('score');

	g_form.setValue('u_mytest', currency_code/currency_amount);
}

 

u_mytest was initially as "integer" type . and i had more than 20 record which was holdig the value, i just deleted and changed the type and then applied onSubmit client script to set the value and its setting as decimal. 

View solution in original post

29 REPLIES 29

would it be possible, if you can connect over webex or zoom call. this way i can quickly dig into that and troubleshoot it. if you want to connect , drop the details on email below

 

hvrdhn88@gmail.com

I work in my company laptop. I cannot connect to any other networks!

It is restricted!

Do one thing, try to create new Field with different name and use script below to set it 

 

function onSubmit() {
	//Type appropriate comment here, and begin script below
	var currency_amount = g_form.getIntValue('<field name>');

	var currency_code = g_form.getIntValue('<field name 2 >');

	g_form.setValue('<your new field>', currency_code/currency_amount);
}

 

But i personally checked , changing the datatype has not created any issue at my end. 

Give a try with new field. 

Earlier i had Inactive the existing payback period field & from Configure form layout I tried to create a new field with same name as decimal type. But it did not get created.

find_real_file.png

In demand table its not there.. is that a problem??

I will delete this column and create new one with same name? Is that Okay?

Because there are other scripts and UI policies on this field 😞

if you will delete, any how you have to manually open those script which has used and set it. 

Does it really matter if you would have different name , if you know those script then manually just change the name on those scripts.