How can I export from the cmdb_ci table and include the sys_id?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 09:31 AM
I need to export any CIs created on the 20th February from the cmdb_ci table and I also need to include the sys_id of each record in the exported data. I cannot seem to find a way to include the sys_id field in to the list view. Any assistance would be appreciated.
- Labels:
-
Data Acquisition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 09:36 AM
Hi
This may get you more than you need, but you can use a URL in the following form to export ALL columns including sys_id:
In my case, I've specified a query that will only bring over software incidents, but you can adjust this to meet your needs. I would recommend starting from incident_list.do (or whatever table you wish to export data from), buildint out the filter you need and then adding &EXCEL&sysparm_default_export_fields=all to the end of the URL.
This is what you will have to do, refer to this thread:
https://community.servicenow.com/community?id=community_question&sys_id=5a444f29dbd8dbc01dcaf3231f961987
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 07:03 PM
Hi
Did you get some time to check the answer and it works well please mark the answer as correct & helpful.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2022 02:35 AM
Hi Sandeep,
Thanks for your help however it doesn't seem to work with me. I found the article you posted but because it didn't work is why I am here. I suspect I am doing it wrong.
My query is for the cmdb_ci table, for any record created on the 20th February 2022. There's ~7000 records to export, but when I export using &EXCEL&sysparm_default_export_fields=all, only a blank Excel sheet is downloaded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 01:27 AM
Hi Sandeep,
Thank you very much for your assistance. My solution ended up being to select "import" from the column header, selecting "update" radio button, and downloading the template while on a filtered list.
This provided me with all fields and whatever values they have, including the sys_id.
&EXCEL&sysparm_default_export_fields=all for some reason never seemed to work and only provided me a blank EXCEL sheet with the columns I had on my List view.