- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2021 11:38 AM
Hi,
some one kindly suggest me how to apply filter on Configuration item field of incident- That filter condition but be reflect on only Incident
need to show below classes only
- Servers
- Computer
- Chromebooks
- Database Instance
- Router
- Switch
- VPN
- Load Balancer
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2021 12:35 PM
Hi,
Yes, you'd want to add your query that you created and copied, to the same "return" result in this script include. The first main if statement would apply be for incident, the second main if statement you can leave alone as that's for requests and request items.
So you'd want to add it to what is already there so like:
if (type == 'Software') {
return 'ref_cmdb_ci_spkg.u_importance!=^sys_class_name=cmdb_ci_spkg';
} else {
return ''; <----------- add it here
For example. Otherwise for that first entry, Software, that has it's own reference qualifier it seems.
I don't know your instance requirements, etc. but you'd want to add the reference qualifier where you need it.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2021 12:35 PM
Hi,
Yes, you'd want to add your query that you created and copied, to the same "return" result in this script include. The first main if statement would apply be for incident, the second main if statement you can leave alone as that's for requests and request items.
So you'd want to add it to what is already there so like:
if (type == 'Software') {
return 'ref_cmdb_ci_spkg.u_importance!=^sys_class_name=cmdb_ci_spkg';
} else {
return ''; <----------- add it here
For example. Otherwise for that first entry, Software, that has it's own reference qualifier it seems.
I don't know your instance requirements, etc. but you'd want to add the reference qualifier where you need it.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2021 12:48 PM
Thanks Allen , it is working fine.
Thanks for your support !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2024 10:44 AM
hi @Allen Andreas
We have a requirement to filter CI selection on Change Request form to show CI's from the Principal Class filter only for which we are using the below Reference Qualifier override on Change Request which correctly filters CI's from the Principal classes
sys_class_nameINjavascript:new PrincipalClass().getPrincipalClasses();
Now, the issue is for certain Class eg: Software Instance class, we need to show only the unique names with the latest version in the list.
For eg: Google Chrome has multiple entries in the Software instance table, so we need to show only one entry of 'Google Chrome' in the CI list, Similarly for all CI's we need to show only Installed CI's and filter out the Retired CI's from the list.
Can you please help suggest how can i update the reference qualifier to show latest version software only in this principal class filter.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2022 08:29 AM
https://docs.servicenow.com/en-US/bundle/sandiego-servicenow-platform/page/product/configuration-management/task/update-principal-class-filter.html