- 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 05:51 AM
Hi
If you can help me in this please?
Thanks,
Vaishnavi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2021 05:53 AM
Why are you concatenating 'USD;' in the variable a2?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2021 05:56 AM
Because i thought Total project cost and Est., Total benefit are currency fields...!
Actually great idea.. let me remove that and Test.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2021 06:00 AM
Let us know in case, you still face issue.
Else you can mark the answer correct and helpful accordingly.
Regards,
Mahesh Kumar