currency and number formatter

een
Kilo Contributor

How do I format a currency field so that it displays 01000000 as $1,000,000.00

my code to display currently is

snipping-tool-code-sample.PNG

where cost is defined as a variable

I've looked at the server side script API and do not seem to be able to locate anything.

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Ian,



Replace line 15


as cost = equipment.cost. getCurrencyDisplayValue(); and you can remove line 16


View solution in original post

14 REPLIES 14

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Thanks Ian for the update. Do you see "Correct Answer" button next to our response?


een
Kilo Contributor

Here is what your response looks like to me. I dont see a 'Correct Answer' button and Actions dropdown is blank for me.



find_real_file.png


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Thanks Ian for the update.


dan.bruhn bianca.vaccarini..Can you please help.


i think this is something dan.bruhn needs to look into


Hi Ian,



The issue you are facing has also effected others and we have identified the cause.   If you are viewing content from the community through your "inbox" view which is from the screen capture you shared the "correct answer" button does not appear.   In order to see the "correct answer" button you need to go to the full discussion.   If you click on this link Re: currency and number formatter you should see the "correct answer" button.   Please let me know if this doesn't work.



Thanks,