Exporting a table

kartikey
Tera Contributor

Hi Everyone,

there's a requirement to export a table (for example Incident or HR case) in any format, for a handover, but the attachments / comments /emails should remain intact with the respective record of the table.
How could this be achieved ?

Regards,
Kartikey

2 REPLIES 2

Nilesh Pol1
Giga Guru

Hi @kartikey ,

You can export all attachments. In order to do that you need to download 2 XML's as attachment data is available in two different tables.

Attachment Tables: "sys_attacment" has got ONE-TO-MANY relationship with "sys_attachment_docs" table

  1. sys_attachment
  2. sys_attachment_docs

Refer this: Attachments in ServiceNow

Steps to download: sys_attachment:

  1. In the navigation filter, enter sys_attachment.list
  2. Use a filter to find the attachments you need. For example: Table Name is Incident. This will give you a list of attachments for incidents table.
  3. To download Right Click between column and do as per shown below

Steps to download: sys_attachment_docs

  • In the navigation filter, enter sys_attachment_docs.list
  • Search by(show related field) then Sys Attachment-> Table name IS Incident.
  • This will give you a list of attachments for incidents table.
  • To download Right Click between column and do as per shown below

Please mark as Correct Answer and Helpful, if applicable.

Thanks.

Hi @Nilesh Pol1 , how would i associate the downloaded attachments with their respective records?

Regards,
kartikey