- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2015 11:51 AM
Hi all,
I have a few currency fields in the expense line table and I am trying to import about 3k records. I get a java.lang.numberformatexception in the import for the currency fields and only 42 records are inserted before the transform crashes. I delete the cost columns and it works fine thus ServiceNow is having trouble converting the data in the excel to the right format.
I have tried the methods in this post : Import Currency fields from Excel loads the wrong numbers
It does not work for me. I was thinking about trying to run some transform scripts to convert the source data myself. I will give updates if it works, but if someone has a solution for this that would be great.
Thanks for any help,
Nate
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2015 06:28 AM
Thanks for the reply I actually found out last night when I tried breaking down the data into smaller pieces to import that there was one value with a "-" in it. I took it out and the full import went in fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2015 03:31 AM
Hi Nathan,
I once had the same problem with the Cost field. The issue was that the Currency data type expects the currency (e.g. USD) and the value together.
It helped me to change the format in the input data to the following:
USD;123.45
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2015 06:28 AM
Thanks for the reply I actually found out last night when I tried breaking down the data into smaller pieces to import that there was one value with a "-" in it. I took it out and the full import went in fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2015 06:27 AM
Refer the post below
Re: Importing different currency
It had worked for me.
If you are having multiple currencies on the spreadsheet, add two columns - currency and cost. The currency column should have the code (System Localization -> Currencies) and the cost column should have the decimal number value. The transform map line will look something like -
target.cost = "" + source.u_currency + ";" + source.u_cost + "";
If you are importing one type of currency, use what Ondrej Ernyei suggested above.