I have to write a script include to exclude the Assignment group from choosing the user .

swetha kurukund
Kilo Explorer

Hi All, 

 

I have to write a script include to exclude the Assignment group from choosing the user . 

I am going to call this script include function in the reference qualifier . 

Assignment group is a reference type field

 

Below is the script include i have created but it is not working accordingly . I am not sure how to exclude that one group and return all the other group as it is in that assignment group field .

 

var Hide _groups = Class.create();

Hide_ groups.prototype = {

              filters1: function() {

             

                             //Quering on group

                            

                             var gr = new GlideRecord('sys_user_group');

                            gr.addQuery('name',XYZ);       // XYZ is the name of the assignment group .This is the only group i am trying to exclude showing from the list                       

                             gr.query();

                             var qry =[];

                             while(gr.next()){

                                                          qry.push(gr.sys_id.toString());

                                                         

                                           }

                                                          else qry.push(gr.sys_id.toString());

                             }

             

                             },

             

              type: 'Hide _groups'

};

17 REPLIES 17

just put this in your condition. assignment_group!=it-snow

You don't need javascript: at the beginning.

 


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

Hi Prateek, 

 

I tried it and  not working . 

 

find_real_file.png

 

 

i am trying to hide the Queue name but it is still showing up in the UI of the CHG request table . 

 

assignment_group!=group name - Group name is the actual group name i have kept here to hide it . 

 

 

 

Hi Prateek, 

I have tried the way you have explained it to me and it did not work . can you please help me as this is not yet resolved. 

 

Thanks.

Hey Arizona 

Lets try this.

name!=YourGroupName

find_real_file.png


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

Agree