- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 04:19 AM
Has anyone been successful in using the abs() method before?
I need to show the total sum as a positive, rather than a negative number.
But I'm not sure what script to write, at the moment the script that sets the value is below, which is getting the information from an existing Script Include for Financial Services Operations Core application.
g_form.setValue('total_amount', financialAccountBaseCurrency + ';' + totalAmount);
So rather than change any of the script of the ScriptInclude (that's doing all the working out and is correct), is it possible to once its got the figure, display it as a positive rather negative number for the end user?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 04:37 AM
Try this
g_form.setValue('total_amount', financialAccountBaseCurrency + ';' + Math.abs(totalAmount));
Thanks,
Yousaf
***Mark Correct or Helpful if it helps.***

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 04:37 AM
Try this
g_form.setValue('total_amount', financialAccountBaseCurrency + ';' + Math.abs(totalAmount));
Thanks,
Yousaf
***Mark Correct or Helpful if it helps.***