How can I export from the cmdb_ci table and include the sys_id?

glj0892
Tera Expert

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. 

7 REPLIES 7

Community Alums
Not applicable

Hi @glj0892 ,

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:

https://instancename.service-now.com/incident_list.do?sysparm_query=category%3Dsoftware&EXCEL&syspar...

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

 

Community Alums
Not applicable

Hi @sureshloganathan ,

Did you get some time to check the answer and it works well please mark the answer as correct & helpful.

Thanks,

Sandeep

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.

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.