- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2014 07:51 AM
I have an excel spreadsheet which I am importing into ServiceNow. On the spreadsheet are two columns, one is the currency code (USD, GBP, etc.) and the other is the amount. In my transform map, I can map the amount directly to the currency field which gets the correct amount but always defaults to USD. If I script the field such as:
target.spent_amount = source.currency + ';' + source.amount;
I still get the currency defaulting to USD but I also get the wrong amount. For example, one record has an amount ~US$1.1million but with the above script I get a result of ~US$315 (not million).
How should I script this so that I get both the correct currency code/symbol and the correct amount?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2014 09:39 AM
A colleague got this to work with the following code:
target.spent = "" source.currency + ";" + source.amount + "";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2014 09:39 AM
A colleague got this to work with the following code:
target.spent = "" source.currency + ";" + source.amount + "";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-03-2014 03:28 AM
Hi Friends,
I tried with the solution that you suggested but it is not working. as I need to set currency as SEK and amount but didnt worked.
Importing into cmdb_software_product_model
target.cost = "" source.u_currencyonetime + ";" + source.u_onetime_cost_sek + "";
target.u_recurring_cost = "" source.u_currentcyruntime + ";" + source.u_runtime_cost_sek_per_month + "";
Please suggest
Thanks
Prashant