Import data from excel (update vs insert)

Jamy1
Tera Guru

A custom table was created to store data where choice list are better managed when lists are substantial. The table may be populated with data from an Excel template, loaded to import set table and transformed through new or existing Transform Maps.

  • There are 5 columns with potential data in each field.
  • There is no unique identifier nor consistent row where data would be unique

Right now, any data uploaded through the Transform map will always be an insert. How do I solve the problem where I get data that needs to get updated (not inserted / not new record/row)?

 

Another way to ask, how do we determine if the the data load is for an update or insert?

9 REPLIES 9

Mike_R
Kilo Patron
Kilo Patron

You'll need a new template & transform map for the updates.

For update, usually your excel file should contain the sys_id or at least a field that you can coalesce on.

Hey, thanks for replying. As mentioned in the post, there is no unique identifier. Do you have any ideas on how to approach this knowing that?

You would need to provide them with a template. To generate the template:

 

Right click on column header -> Import

Mike_R_0-1667871439208.png

 

Select update and then Create Excel Template

 

Mike_R_1-1667871511803.png

 

This will create an excel template and include the sys_id, which becomes the unique identifier. You can then upload the template and it will update the appropriate records by matching on the sys_id from the excel template.

 

Hey Mike, this is helpful.

Apologies as I wasn't more specific. There is external data that I need to export from and then import into ServiceNow. That data doesn't have any unique identifiers. Is there a way that when I insert that exported data into ServiceNow, I can find a way to determine how it'll update or insert? Sometimes the records need to be updated, other times it'll be new records.