- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2021 05:47 AM
Hi,
I have a decimal field Payback period but it does not show decimal value.
19350/252 = 77.4 but it shows only 77.
Client script for that is,
Thanks,
Vaishnavi
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2021 06:53 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2021 06:32 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2021 06:35 AM
I work in my company laptop. I cannot connect to any other networks!
It is restricted!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2021 06:38 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2021 06:44 AM
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.
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 😞

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2021 06:48 AM
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.