Export FAQ


Details

 

Contents

  1. How can I export all attachment records from my instance?
  2. How can I export task records (incidents, cases, problems, etc) with attachments?
  3. How can I export task records (incidents, cases, problems, etc) with email data?
  4. How can I bulk export all my knowledge base articles?
  5. Why is the export producing less records than expected?
  6. I need to export a large number of records from my instance. Do you recommend any best practice methods? What should I prepare for?

 

1. How can I export all attachment records from my instance?

There is currently no Out-Of-Box feature on the ServiceNow Platform that directly downloads all attachments from the instance.

Attachments are stored in two separate tables: sys_attachment and sys_attachment_doc. The sys_attachment table contains an entry for each attachment that is tied to a particular record and the sys_attachment_doc table is the actual content of the attachments broken up into smaller chunks. 

Here are some custom solutions that can help you get started:

Keep in mind that these are solutions that are outside of the official ServiceNow platform and support for these solutions from ServiceNow will be limited.

2. How can I export task records (incidents, cases, problems, etc) with attachments?

There is currently no out-of-the-box method or feature to easily export attachments associated to task records. 

This community article explains how you can achieve this by renaming attachments so you can easily associate them with the exported tasks.

Another method is to extract the attachment data separately.  For more information see KB0540071: Including attachments when exporting incidents, problems, and other records

There is an existing enhancement request in the ServiceNow official idea portal about this.  If this idea gets enough upvotes, it may be considered to be part of the ServiceNow platform.

3. How can I export task records (incidents, cases, problems, etc) with email data?

There is currently no out-of-the-box method or feature to export email data associated to task records.  One method is to join the Email table with the task table using the database views feature.  Then the database view can be exported.

4. How can I bulk export all my knowledge base articles?

The method you use will depend on the reason for exporting the records. 

If you want to export the records so you can copy them into another instance, then you simply use the "Export to XML/Import from XML" method mentioned in our official documentation.  Note that along with Knowledge Base [kb_knowledge] records, you will also have to copy data referenced from these records (the attachments and the knowledge base category [kb_category] records, for example).  I understand that this process requires many steps, unfortunately, there is no out-of-the-box feature that will allow you to do this in one step.

We've heard customers asking for knowledge base article export so that they can be easily read by humans.  This requires two things 1) exclude knowledge base form fields and 2) embed any images in the knowledge base article body.  Unfortunately, there is also no method to bulk export knowledge base articles so that they can easily be read as with a book.  For individual exports, the "Save as PDF from the Browser" method, which is mentioned in this community question, may work for you.

Here are a couple of community threads around this same issue:

  1. Community: Bulk Export Knowledge
  2. Community: How to formulate a API to get articles from multiple knowledge base?

 

5. Why is the export producing less records than expected?

First, you must confirm that the expectation is correct - in other words, the system may be producing the correct number of records but you are expecting different results. One quick way to make sure the number of exported records is correct is to compare the total of exported records with the total of records from the UI list view.  If the number of exported records matches the number from the UI list view, then there is nothing wrong with the export.  If the total of exported records and the records shown in the UI list view match, but this is still the number you don't expect then you need to treat this as a list view platform issue instead of an export issue. This is an important subtlety because troubleshooting a UI list view simplifies the issue.

If the number of exported records is less than the number of records from the UI list view, then the first thing to check is if the export hit some limit.  You can learn more about export limits from the official documentation or KB0538324:Troubleshooting export - Determine if the configured maximum rows to export is too low.

A good troubleshooting step is to reproduce the query using a GlideRecord and GlideRecordSecure background script.  If the background script produces the same number of the export and this number is different than the UI list, then you have successfully eliminated the export feature from your troubleshooting.  In other words, you are now troubleshooting an issue in which a GlideRecord script produces different results than simply listing the same query from the UI.

6. I need to export a large number of records from my instance. Do you recommend any best practice methods? What should I prepare for?

The first thing you may run into is the limitation in the number of records you are allowed to export.  The export limits exist to avoid performance issues caused by extremely large exports. For example, in KB0695242, an out-of-memory issue occurred when exporting large amounts of data to a CSV file.  You may be tempted to extend the export limit to export all the data in one export action, but we recommend against doing so.  Instead, we recommend you break up the data in chunks and perform several exports - more information in this article from our official documentation.

You should not see any negative performance effects when exporting large amounts of data as long as you stay within the limits.

If you notice that your exports are taking a long time to process, there are some things you may want to consider to speed up the process:

  • Add more filters to decrease the number of records in the results
  • Avoid using fields that have no index for filtering and sorting
  • Export to a different format. Try a more compact format, such as CSV
  • Break up the export as mentioned above

For more information see KB0538303: Troubleshooting Export – Determine if there are too many records in the export set