Show Full Numbers Instead of K/M in Project Workspace

keisuke miya
Tera Contributor

Hello everyone,


I have a question about the Financials section in Project Workspace.

At the top, amounts are displayed using abbreviations like "K" and "M."
Is there a way to show the full numeric values instead?

 

In Japan, it's standard to display full amounts without abbreviations—for example, showing 100,000 instead of 100K, or 1,000,000 instead of 1M.

I would like to display the amounts without using "K" or "M."

Thank you,

2 ACCEPTED SOLUTIONS

Bhuvan
Kilo Patron

@keisuke miya 

 

Check with ServiceNow if this can be managed via System Properties. Here is the alternative option,

 

All the information you are seeing in Workspace comes from Widgets. For example, let us take 'Planned Cost' widget that contains 'Capex' and 'Opex'. Workspace Widgets can be accessed from table 'sn_app_widget'.

 

Below is a sample Financials displaying Planned Cost, Capex and Opex with abbreviation [default]

Bhuvan_0-1755480871257.png

Go to 'sn_app_widget', search for 'Planned Cost' and open the record. Comment the displayValue that formats the currency and use the actual value to display the financials without abbreviation. Repeat same steps for Capex and Opex Child Widgets

Bhuvan_1-1755481326735.png

var context = JSON.parse(context);
var investment = context.investment;

(function getCost() {
	//Note: return the value in below format in order to achieve color formatting of negative values
    return {
        value: investment.cost.value,
        //displayValue : PPMCurrencyHelper.getFormattedAmountWithCurrency(investment.cost.value)
		displayValue: investment.cost.value
    };
})();

Below is the Widget after the changes,

Bhuvan_2-1755481486672.png

 

You can revert back the change to use system default. Please note, this is for testing purposes only and do not recommend you to change the settings without confirmation from ServiceNow support team as it might not be officially supported and could lead to technical debt.

 

If this helped to answer your query, please accept the solution and close the thread.

 

Thanks,

Bhuvan

View solution in original post

Dheeraj Bharsiy
ServiceNow Employee
ServiceNow Employee

Hi @keisuke miya 

 

In order to show the currency display value instead of showing the short format values, we can update the widgets to use displayValue property which is already being returned from the widget api.

As @Bhuvan   mentioned, we need to update the script of the individual widget but the only difference is we need to use displayValue property which honour the locale of the instance. 

Example of updated script from one of the widget: 

value: investment.work_cost.value,
displayValue: new global.UserLocaleUtil.getGlobalLocale().currency_symbol+""+investment.work_cost.displayValue,

If you also need to have currency symbol before the currency value, you can use the global UserLocaleUtil api as above. 

View solution in original post

6 REPLIES 6

@keisuke miya 

 

Glad it helped.

 

Check with ServiceNow support if there is an option to control this via system properties as it will be much easier & optimal to maintain. If you customize it via scripts, it might create technical debt and since it involves multiple widgets, maintainability & upgradeability could be a challenge.

 

Thanks,

Bhuvan

Dheeraj Bharsiy
ServiceNow Employee
ServiceNow Employee

Hi @keisuke miya 

 

In order to show the currency display value instead of showing the short format values, we can update the widgets to use displayValue property which is already being returned from the widget api.

As @Bhuvan   mentioned, we need to update the script of the individual widget but the only difference is we need to use displayValue property which honour the locale of the instance. 

Example of updated script from one of the widget: 

value: investment.work_cost.value,
displayValue: new global.UserLocaleUtil.getGlobalLocale().currency_symbol+""+investment.work_cost.displayValue,

If you also need to have currency symbol before the currency value, you can use the global UserLocaleUtil api as above.