How to avoid data export converting currencies?

rightpalava
Mega Expert

We have a table of records, with a few currency fields.   The vaules are in GBP, USD and other currencies, but when an export is run (simple Excel export) the currencies are all converted to default GBP.   The customer wants the currencies to remain as they are shown in the table within ServiceNow.

 

Any ideas folks?

5 REPLIES 5

Anurag Tripathi
Mega Patron
Mega Patron

Hi Adam,



Interesting, I never thought in this direction.


I think it converts local currency of the user who is exporting (GBP) ni your case. I will keep looking and keep an eye on this post for any leads.


-Anurag

Jamie_douglas
Giga Expert

Hi Adam, did you ever find a fix or workaround for this as I have the same issue? Brad Tilton (Cloud Sherpas) any chance you have come across this before?



I can also add to this... When my customer clicks on the "info" related list icon, the popup view of the records shows currency in the users local currency, my customer wants that view to also show the currency that has been set rather than local currency. I have tried loading the sys_popup view to see what happens and the currencies are showing correctly, its just when you hover your mouse over the related list that it shows the currency in the users local format.


Scot_Soares
Tera Contributor

Adam,



I had a similar issue. My solution was to create two new String fields on the table in question and then via a Business Rule, 'copy' in the amount and the currency. In this example, I have a currency field called Total Invoice Amount and I created two string fields (Reporting Amount and Reporting Currency). This Business Rule runs any time that value of that field changes:



//This rule copies the value and currency in the Total Invoice Amount field to the Reporting Amount and Reporting Currency fields (hidden fields that are not visible on the ticket form). We added these fields as a workaround due to an open bug with how the Total Invoice Amount (currency) field works with reporting. The Condition means it will only run if the Total Invoice Amount field is populated.




copyTotalToReport();



function copyTotalToReport() {


  var sksOrig = current.u_total_invoice_amount.getCurrencyString();//I had to use getCurrencyString to make sure it used the value in it's original currency and not the USD reference value


  current.u_reporting_amount = sksOrig.slice(4);//Copy original currency amount to Reporting Amount field


  current.u_reporting_currency = sksOrig.slice(0,3);//Copy original currency 3-letter designation to Currency field


}



Add these fields to a report and it exports correctly to Excel.



Scot


I know it is very old post but just wanted to share that Kingston version fixed this issue by providing system properties. Please refer below link for more details


https://docs.servicenow.com/bundle/kingston-servicenow-platform/page/administer/exporting-data/conce...