removing commas in numbers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2015 02:59 AM
Morning all,
I am importing some data from an old system into ServiceNow, the reference number from the previous system will go into a custom field in ServiceNow. This is working however it is adding a comma so the number becomes 32,546 instead of 32546. How do I stop this happening?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 01:24 AM
Further to my last message It does alert me with the ontime number without the comer but does not update the field with that number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 01:26 AM
the field in service now where you are populating this number, what is its type?? make it string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 01:28 AM
where you are trying to update that number? i mean which type of field.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 01:32 AM
Indeed, just to explain, we are porting tickets from a legacy system into ServiceNow. We want the onTime ref number to populate a read only string field called on time reference, When mapping the fields the information moves over fine however the a comer is added to the field, this does not exist on the spread-sheet so its something that ServiceNow is adding. I have tried the suggestions on this thread, all of which makes sense but none of them seem to work.
Just to clarify my last response, the alert I am getting is the number in the script, not the number in the field minus the comer, My mistake.
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2015 12:20 PM
Steve,
See if it helps, I had the same issue and it worked for me.
Transform Maps Remove comma for on insert to string field
In case the import set table field also a String then you can try adding the below piece of code in the Script part of your Transform Map.
target.<string_field_name_in_target_table> = source.<string_field_name_in_import_set_table>.toString().replace(/,/g,'');