Where ServiceNow Export Limitations get defined…

General Add comments
by:

As a support engineer I see a lot of export limitation issues. I thought it may be useful to create a small blog article for it.
So here it is. πŸ˜‰

As a default, the maximum total of 50000 records is used for exports in an instance. This is done to prevent performance issues that may occur when users are querying the tables for their exports.
If you want to have more results in your export, ServiceNow recommends to break the export into smaller, incremental chunks.
You can read more of this in the ServiceNow Wiki:

https://wiki.servicenow.com/index.php?title=Exporting_Data#Breaking_Up_Large_Exports

This default export limit can be defined in a system property β€œglide.ui.export.limit” which has a default value of 50000. You can of course increase this amount, however be aware that there is a performance reason for having this property!

Unfortunately, this property does NOT apply to all exports and there are other limits and properties as well that you should be aware of..
Hey, that is why I wrote this blog πŸ˜‰

As you may know there are 4 file types that can be used as the format for the export. Each export type has its own β€œrules” related to the export limitation.

  • Excel File (.XLS)

Excel exports are meant for small exports (up to 500.000 cells in Excel). If you need to create an export that contains more cells it is recommended to export to the CSV format which can handle larger exports.

In the default situation (so when there is no glide.ui.export.limit property or if it is set to the default value of 50000) you are going to get up to 50000 records. 32000 records in the first page and another 18000 records in the second page……..UNLESS…… you exceed another limit!?Β  πŸ™

What could happen here? The maximum number of cells for Excel is controlled by the system property “glide.excel.max_cells“.
So this can break down your .xls export as well !!

Increasing this threshold may cause a memory issue in your instance, so be aware of this if you want to change this.
As far as I know the 32k page amount is an Excel limitation, however I am not 100 % sure about that.

  • Comma separated File (.CSV)

These files are limited by the default “glide.ui.export.limit” property only, so that is an easy one…. πŸ™‚

  • Portable Document Format (.PDF)

PDF files are having their own limits and are controlled by the property “glide.pdf.max_rows” which has a default value of 5000.
So in this situation the system checks the following two properties β€œglide.pdf.max_rows” and β€œglide.ui.export.limit”.
The property with the lowest amount set will be used to limit the output for the .pdf file.

  • Extensible Markup Language (.XML)

XML files are controlled by the default β€œglide.ui.export.limit” property as well.

Export on a Database View

Finally there is something that you may want to know when creating exports from a database view. There is a special property for exporting/querying on these views.
The β€œglide.db.max_view_records” property can be used for situations that are not using windowing and has a default value of 10000. For example if there is a business rule or any script that does something like this:
[cc lang=”javascript”]
var gr = new GlideRecord(‘incident_metric’);
gr.query();
while (gr.next()) {
// do something
}
[/cc]
…then the results of that query will be limited based on this property.
However, if the query is windowed (for example if you want all records between numbers 0 and 2500) then this β€œglide.db.max_view_records” property does not apply.

Hope this helps you when creating your exports!

Please email me if you may have questions on .img[at].img

One Response to “Where ServiceNow Export Limitations get defined…”

  1. Eric P Says:

    I’m not sure why you wrote an article on this topic when you didn’t supply a single new fact that isn’t on the one Wiki article. It looks like you’re just trying to duplicate information and call it your own when you’re not assisting the community.

Leave a Reply