I would like to hide one class of config items on Incident form

billcravey
Kilo Contributor

When our Service Desk members are creating a new Incident and select the Configuration Item field, I would like to hide the "Epic Ini" class from them in order to reduce the number of unnecessary returns that they see. I am trying to make this work with an ACL but can't seem to get it.

Thank you

1 ACCEPTED SOLUTION

Hi Bill,



That makes more sense! A picture is worth a thousand words. It looks like someone tried hard coding in a static reference qualifier at one point (all the other text.) You wanted to do it dynamically with a script. Use either or. The objective is to tell the lookup "Hey, this is additional query information you'll want to know". That script looks a bit of a mess and tricky to maintain. Replace it with just the single line:



javascript:hideMyCiClass();



give it another test. Of course, copy all that text somewhere in case you need to put it back at some point! 🙂


View solution in original post

17 REPLIES 17

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Bil,



You can achieve this via reference qualifier condition.


http://wiki.servicenow.com/index.php?title=Reference_Qualifiers


top_tanti
Tera Expert

From the Incident form, you can


1. Right-click next to the CI field > Dictionary



Option 1: Specify the Reference qualifier - this will impact all forms that use the CI field


Option 2: Create a Dictionary Override for the Incident table and specify the reference qualifier - this will only impact the Incident form



*Tip: The reference qualifier to remove a specific CI Class (e.g. Computer) would look something like this: sys_class_name!=cmdb_ci_computer


billcravey
Kilo Contributor

Thank you both for your replies. I still don't understand how I hide it from specific users only, in this case the members of our Service Desk group.


Hi Bill,



You can create a script include and then place logic to return all only if user is not member of group "Service Desk".


I.e gs.getUser().isMemberOf( ­'Service Desk'); //will return true only if user is member of group "Service Desk"


Getting a User Object - ServiceNow Wiki



Please refer the sample script in the link shared and adjust your solution.


Please let me know if you have any questions.