Importing Duration from Excel Spreadsheet

Brian S1
Mega Contributor

Hi Everyone,

I am attempting to import call duration from an Excel spreadsheet to a custom table within ServiceNow. I created the transform map to import the records once I load the data, but the duration column is populating as '(empty)'. After searching through many of the forums, I have found others have been able to successfully import data by utilizing the script 'target.duration.setDateNumericValue(source.u_duration*1000);' but I'm unsure where I need to place this within my transform map or if I should create a business rule. I'm very new to JavaScript so any help would be greatly appreciated.

find_real_file.png

Thank you,

Brian

17 REPLIES 17

Hi Abhishek,

Got it! It looks like there was an issue with the Call Logger table. I decided to start over and create a new table and transform map and it looks like the records are now making it over to the Call Log table.

Thank you so much for your help through this process. It has been greatly appreciated!!

Thanks,

 

Brian

Awesome. Sorry I missed your reply. Glad you were able to figure it out. 

Ashok Katam
Mega Guru

Hi Brian

You have Transform Scripts there, you can create on as 'OnAfter', and put the code in function. You can delete the particular field map row.

This OnAfter script runs after every row has transformed and sets this field at the end.