var BackfillAssignmentGroup = Class.create(); BackfillAssignmentGroup.prototype = { initialize: function() { }, BackfillAssignmentGroup:function() { var gp = []; var a = current.assigned_to; //sys_user_grmember has the user to group relationship var grp = new GlideRecord('sys_user_grmember'); if(a){ grp.addQuery('user',a); } grp.addEncodedQuery("group.typeLIKEcff624593854010072edffb4849a2c4a"); //Set to your Group SID Type to limit amount of Groups. grp.query(); while (grp.next()) { gp.push(grp.getValue('group')); } // return Groups where assigned to is in those groups we use IN for lists return 'sys_idIN' + gp.join(','); }, type: 'BackfillAssignmentGroup' }; // Below is the Advanced Reference Qualifier for the Task Table Assignment Group Refrence Field - With No Attributes Needed. javascript:new BackfillAssignmentGroup().BackfillAssignmentGroup()