Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

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

Not applicable

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

sandeepdutt
Tera Patron

Hi @Community Alums ,

 

You can use GlideRecord / GlideAggregate for a particular table, but the challenge is the if that table has millions of data, it will impact the Performance and can timeout while querying.

What i did was, Exported the data in a Excel sheet and then analyzed what is need.

Not applicable

Hey, I want to do the similar thing, I have created a dataset, do you know how to use this dataset in prompt

 
 

Screenshot 2026-02-24 143941.png

Tanushree Maiti
Tera Patron

Hi @Community Alums 

 

GlideRecord() with query(addQuery() or addEncodedQuery()) & using 'while' loop will return all the records from the table which you are querying dependent upon the query being matched

 

Sample Server-Side Script Example (GlideRecord)

Here is a common approach to retrieve all records and their data:

 
var tableName = 'incident'; // Replace 'incident' with your table name
var gr = new GlideRecord(tableName);// No addQuery() or addEncodedQuery() means it will fetch all recordsgr.query();

// Create an array to store the data
var recordsList = [];while (gr.next()) {
     var recordData = {};
    // Get specific field values and add them to the object
     recordData.number = gr.getValue('number');
    recordData.short_description = gr.getValue('short_description');
    recordData.assigned_to_display = gr.getDisplayValue('assigned_to');
    // Add more fields as needed    recordsList.push(recordData);
}gs.info("Total records fetched: " + recordsList.length);

yashkamde
Tera Sage

Hello @Community Alums ,

 

You can directly add a prompt for this in prompt editor - now assit skill kit :

ForrestFalk_28-1765556550384.png

 

If my response helped mark as helpful and accept the solution.