How can i get sys_id included while exporting a list in Excel format ?

abhyodaya_padiy
ServiceNow Employee
ServiceNow Employee

I want to get a sys_ids of records while exporting records from ServiceNow list to Excel format . Is there a way to do it?

1 ACCEPTED SOLUTION

shimongabai
ServiceNow Employee
ServiceNow Employee

The way to do that is by using the sysparm_default_export_fields parameter on the URL.


i.e. /sys_user_group.do?EXCEL&sysparm_default_export_fields=all



You can change EXCEL to be any of the typical export formats, and this will ensure you have all of the data you want, including the sys_id.


View solution in original post

3 REPLIES 3

shimongabai
ServiceNow Employee
ServiceNow Employee

The way to do that is by using the sysparm_default_export_fields parameter on the URL.


i.e. /sys_user_group.do?EXCEL&sysparm_default_export_fields=all



You can change EXCEL to be any of the typical export formats, and this will ensure you have all of the data you want, including the sys_id.


gputker
Tera Contributor

The very best and easiest way to do this is to create a Database View.  Within the database view add the table you wish to extract Sys_IDs from.  Once you have added your table, open it and add the fields to the table you wish to see (of which sys_id will be one of them).  There is no need for a 'Where clause' because you are not actually conducting a DB join.

Click 'Try it' on the DB View and watch a list of your data appear with SYS_ID available.  You can then export this data into excel.

Whats great about this method is that its very easy and non invasive (like a script or a new table can be) AND you can filter your data first within ServiceNow (using fields data you have added) and then export it.  Screen Shots attached in order!

Bob D
Tera Expert

I tried both of these solutions and they seem to work,  meaning I can dump a table into EXCEL and the sys_id value for the records is included in the output.  However I have additional requirements.   I want to filter the output based on the value of one of the fields in the table (say, export records from cmdb_ci_computer but include only records with Status=Installed).   What if I want to schedule the export to run automatically? 

Is there a way to do these things?   Or do I need to script a solution

- thank you