Import data from excel (update vs insert)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 05:06 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 05:32 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 05:35 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 05:40 PM
You would need to provide them with a template. To generate the template:
Right click on column header -> Import
Select update and then Create Excel Template
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 05:46 PM - edited ‎11-07-2022 05:47 PM
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.