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

Restrict assignment group field only for Service Desk

TomG2
Tera Contributor

Hi all,

 

I'm trying to restrict the Service Desk from seeing 1 specific group in the assignment group field and I'm not sure exactly how to go about this.

I managed to make it so service desk can only see that group using the reference qualifier but thats the exact opposite of what i'm looking for.

 

So for example

Group 1: Service Desk

Group 2: Management

 

I want group 1 to be able to select any group in the assignment group except group 2.

 

Any help would be appreciated,

Thank you!

6 REPLIES 6

Even when removing the "<>", it is still not working unfortunately 

Hey @TomG2 

Just remove these characters out "<>". Your function should be like below.

    getGroupReferenceQual: function() {
        var query = 'active=true'; //replace your default query here
        if (gs.getUser().isMemberOf('Service Desk')) {
            query += '^sys_id!=da01db8b1bab6300f17ddc65bd4bcb40'; //Vendor
        }
        return query;
    },

 

You can also apply the condition right inside the reference qualifier in dictionary.

Sample below.

javascript&colon; (gs.getUser().isMemberOf('Service Desk')) ? "sys_id=da01db8b1bab6300f17ddc65bd4bcb40" : "active=true";

 

You can also store the sys_id in a system property to avoid hard-coding. Just use the API below to get the property value.

gs.getProperty("<your_system_property_name>");

 

Cheers,

Tai Vu