Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

what is the glide aggregate function?how to use

preddy1
Giga Expert

what is the glide aggregate function?how to use

1 ACCEPTED SOLUTION

Hi 

Please try it in the background script :-

 

var count =new GlideAggregate('incident');
count.addAggregate('COUNT');
count.query();
var incidents =0;
if(count.next())

{

incidents = count.getAggregate('COUNT');
gs.print(incidents);
}

Copy paste this code in Background script.

See below :-

 

find_real_file.png

 

find_real_file.png

find_real_file.png

Regards,

 

Omkar Mone.

www.dxsherpa.com

View solution in original post

23 REPLIES 23

when to run :before or after and i should use these as query

 

Hi,

 

Follow below link it will contain the info about when to run :before or after and you should use these as query.

 https://community.servicenow.com/community?id=community_question&sys_id=febb4f96dbf657c0200f0b55ca961937

Please mark my answer as correct if it helps and close the thread so other can refer it.

 

Thanks,

Tejal

i cant find the link could u send me business rule link where we use these scripts

Hi ,

 https://community.servicenow.com/community?id=community_question&sys_id=febb4f96dbf657c0200f0b55ca961937

 

 Mark my answer as correct if it helps and close the thread so other can refer it.

Thanks,

Tejal

 

 

 

find_real_file.png

find_real_file.png