Multiple assignment Group

Garvit1
Tera Contributor

Hi Team, 

i need to pull out a report where i don't want existing assignment group, other than the existing group i need to pull the report, 

what condition i can apply in the report. 

 

Regards,

Garvit

7 REPLIES 7

Rohit99
Mega Sage

Hi @Garvit1,
You may follow the screenshot.

Rohit99_0-1727269019306.png

 

Please mark my response as correct and helpful if it helped solved your question.

 

Thanks,

Rohit Suryawanshi

Garvit1
Tera Contributor

@Rohit99 i have around 130 assignment groups

Hi @Garvit1,
Sorry for the late reply.
You can call script in Reports as follows:
Script:

var ReportUtils = Class.create();
ReportUtils.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
    getRecords: function() {
        gs.info("Starting to get records...");
        var recs = [];
        var gr = new GlideRecord('incident');
        gr.addEncodedQuery('assignment_group.name NOT IN Network,Ask HR,Hardware');  // HERE PROVIDE YOUR GROUP NAMES
        gr.query();
        while (gr.next()) {
            recs.push(gr.sys_id.toString());
        } 
        gs.info('Retrieved records: ' + recs.join(', '));
        return recs;
    },

    type: 'ReportUtils'
});



Rohit99_0-1727428312782.png

 

 

 

Rohit99_1-1727428386047.png

 

 

Please mark my response as correct and helpful if it helped solved your question.

 

Thanks,

Rohit Suryawanshi