- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2019 04:31 PM
Please I need help to write a script include that will filter CIs to some classes in INC form. classes includes:
Application
Business Service
Business Application
Business capability
Hardware
Storage Device
Voice System Hardware.
the Idea is that we do not want to expose all the CIs in the cmdb to Caller/service desk. we want to limit them to those classes only.
Any help will highly be appreciated
Solved! Go to Solution.
- Labels:
-
Instance Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2019 07:11 PM
Hi,
you can set the filter condition in the field by configuring the dictionary for cmdb field on incident form to show only those classes; create a dictionary override record for incident table and override reference qualifier as true; ref qualifier as below
sys_class_name=cmdb_ci_business_app^ORsys_class_name=cmdb_ci_service^ORsys_class_name=cmdb_ci_business_capability^ORsys_class_name=cmdb_ci_hardware^ORsys_class_name=cmdb_ci_storage_device^ORsys_class_name=cmdb_ci_volume_template^EQ
Ensure you give all class names correctly; In order to get this condition/filter go to cmdb table and apply the filter condition for your classes; copy the query and paste it in ref qualifier
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2019 07:11 PM
Hi,
you can set the filter condition in the field by configuring the dictionary for cmdb field on incident form to show only those classes; create a dictionary override record for incident table and override reference qualifier as true; ref qualifier as below
sys_class_name=cmdb_ci_business_app^ORsys_class_name=cmdb_ci_service^ORsys_class_name=cmdb_ci_business_capability^ORsys_class_name=cmdb_ci_hardware^ORsys_class_name=cmdb_ci_storage_device^ORsys_class_name=cmdb_ci_volume_template^EQ
Ensure you give all class names correctly; In order to get this condition/filter go to cmdb table and apply the filter condition for your classes; copy the query and paste it in ref qualifier
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2019 02:42 PM
Hi Ankur,
Thanks for your help, this approach also work. I just decided to do the script include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2019 05:01 AM
I found the easiest way of doing this was with an advanced Reference Qual entry. The value we have setup is:
sys_class_nameINSTANCEOFcmdb_ci_hardware^ORsys_class_name=cmdb_ci_business_app^ORsys_class_name=cmdb_ci_vpn^ORsys_class_nameINSTANCEOFcmdb_ci_comm^ORsys_class_nameINSTANCEOFcmdb_ci_ip_phone^ORsys_class_name=cmdb_ci_crac^ORsys_class_name=cmdb_ci_generator_power_eq^ORsys_class_name=cmdb_ci_ups^ORsys_class_name=u_cmdb_ci_fire_suppression^nameISNOTEMPTY^install_status!=7^EQ
Which looks like this in the condition builder view:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2019 08:22 AM
Hi Ian,
We don't want to touch the task base table. the idea is to create a Dictionary Overrides so that it will only affect the Incident, other tables will not be affect with the filter. and to build a condition will be too much . because take for instance HARDWARE, will want to capture all other classes that extended under the cmdb_ci_hardware, cmdb_ci_server, will would like to capture things like Windows server, Linux server etc.