Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Service Catalog visability based on users "title"

EcFuhrmann
Tera Contributor

I am looking for assitance with away to create a user critiera profile based on the title of a users profile. I need to only allow users with "HR" in their title under their users profile to see a form in the service catalog. Is there away to use a script to get this to work? 

1 ACCEPTED SOLUTION

@EcFuhrmann The script which I have provided validates if the title contains "HR" (indexOf) and only those users will be able to access it. 

 

Below is another e.g, 

 

   if (title.indexOf('vp') > -1 || title.indexOf('director') > -1 || title.indexOf('manager') > -1) {
        return true;
    }
    return false;
}

 

 

Note: Converted the title to lowercase and have used in above "If" condition. 

 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

 

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

View solution in original post

5 REPLIES 5

EcFuhrmann
Tera Contributor

Thank you for the help!