logo

NJP

Optimizing Pagination in GlideRecord with ChooseWindow and SetLimit

New article articles in ServiceNow Community · May 20, 2025 · article

In this article we give some examples of how to improve performance with chooseWindow, setNoCount and the "Data Table" Service Portal widget. One of the things in ServiceNow that can kill performance is when a large list is queried and a slow query runs to count all the matching records. Sometimes you need to run this query and sometimes you don't. With large tables it is really best to try to avoid this query whenever possible or make it run asynchronously or on-demand so that it doesn't slow down your user experience.

View original source

https://www.servicenow.com/community/developer-blog/optimizing-pagination-in-gliderecord-with-choosewindow-and/ba-p/3269136