Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

How to fetch all the records for table and provide to analyze in Now Assist Skill Kit

VaibhavP5059517
Giga Guru

I want to fetch all the records of a particular table rather than a single record of a particular table to provide as an input in script to analyze, is it possible or any alternative, if not.

5 REPLIES 5

Rainer Alföldi
Tera Contributor

The approaches suggested here will run into serious trouble at scale. Loading all records into a JavaScript array will consume instance memory proportionally to the dataset — on a table with 100K+ records, you are looking at timeouts or transaction cancellations or an instance crash.

For large datasets, you need to paginate (sysparm_limit + sysparm_offset if using REST, or setLimit/chooseWindow with GlideRecord) and process in chunks.

For Now Assist specifically, consider whether you actually need all records or whether aggregate/summary data would serve the analysis better.

Rainer Alföldi
Founder, arc46 — Squid | No-Code ServiceNow Data Integration