I have to write a script include to exclude the Assignment group from choosing the user .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2019 07:37 AM
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'
};
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2019 12:02 PM
Hi,
Is that grup static or you want to hide the assignment group which is selected?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2019 02:29 PM
All,
I am good . Thank you so much .
I tried in other way and it worked .
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2019 02:33 PM
Did you try the last response i posted??
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
