I need help with script to update bulk of records from excel file to form field

Zuri
Tera Expert

I need to update shipping address of requested items with these data from excel file. I have more than 1000 records

NumberAddressCityStateZip
RITM0010015MultipleMultipleVAMultiple
RITM00100161007 Green Street SoutheastConyersGA30094
RITM0010017254 Daniel Webster Highway #4NashuaNH03060
1 ACCEPTED SOLUTION

Oscar Lopez
Mega Guru
Mega Guru

What you need to do is to load the data using Import Sets.

By using a Transform Map you can change the value of the given record by using the Run Script of the transform map, something like:

For Reference field

target.variables.variable_name.setDisplayValue(source.u_incoming_value);

For Simple text field

target.variables.variable_name = source.u_incoming_value;

 

and don't forget to coalesce using your RITM number.

That should do the work.

View solution in original post

5 REPLIES 5

MrMuhammad
Giga Sage

Hi @Zuri,

Can you re-attach the file? 

Regards,

Muhammad

Regards,
Muhammad

Number Address City State Zip
RITM0010015 Multiple Multiple VA Multiple
RITM0010016 1007 Green Street Southeast Conyers GA 30094
RITM0010017 254 Daniel Webster Highway #4 Nashua NH 03060
         

MrMuhammad
Giga Sage

Btw you can import excel data into Servicenow without scripting if the data is clean. Follow the instructions given step by step on the below articles to achieve this.

Importing Data from Excel sheet to Servicenow 

Regards,
Muhammad

I did look into that but is not like I am importing data. I want to update the records which they provide me excel file. I was looking to use background script or fix script to do it but I am not sure how I can do it with with the excel file. I know how to do background script using tables not external data.