The CreatorCon Call for Content is officially open! Get started here.

Display active incident records from the category hardware and software.?

ram2497
Tera Contributor

Display active incident records from the category hardware and software.

1 ACCEPTED SOLUTION

Archana Reddy2
Tera Guru

Hi Ram,

The below one may help you.

var arr=[];
var inc = new GlideRecord('incident');
inc.addActiveQuery();
inc.addEncodedQuery('category=software^ORcategory=hardware');
inc.query();
while(inc.next())
{
arr.push(inc.getValue('number'));
}
gs.print(arr); 

Hope this helps!

Thanks,

Archana

View solution in original post

6 REPLIES 6

Archana Reddy2
Tera Guru

Hi Ram,

The below one may help you.

var arr=[];
var inc = new GlideRecord('incident');
inc.addActiveQuery();
inc.addEncodedQuery('category=software^ORcategory=hardware');
inc.query();
while(inc.next())
{
arr.push(inc.getValue('number'));
}
gs.print(arr); 

Hope this helps!

Thanks,

Archana

Hello, could please guide me

  • Display 10 incidents( number,caller,category ) which were created between 1 january 2022 and 1
    march 2023 and category is hardware .