- 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 11:40 AM
Hi,
You can right-click on the configuration item label and choose "configure > dictionary" then scroll to the bottom related lists and in the dictionary override, look for a record for incident if it's already there, if so, open that record and add your reference qualifier in that field. If not, you can create one and add the reference qualifier there.
Replace this highlighted portion with the other query as shown in the last screenshot below):
Example, create filter:
Copy the query the place in that reference qualifier field:
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:16 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2021 12:19 PM
Hello,
Hopefully my above reply was at least Helpful.
As far as adding a custom reference qualifier in addition to that script, you wouldn't be able to do that unless you edit that script include mentioned in that field. Your requirements are changing and different from out-of-box, so you wouldn't be using the out-of-box qualifier at that point.
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:28 PM
yes, we are not using OOB qualifier here.
do i have to modify in script include side ?
var RefQualifierUtil = Class.create();
RefQualifierUtil.prototype = Object.extendsObject(AbstractAjaxProcessor, {
type: 'RefQualifierUtil',
getCIdQualifier: function(type, table) {
if (JSUtil.notNil(type)) {
if (type == 'Software') {
return 'ref_cmdb_ci_spkg.u_importance!=^sys_class_name=cmdb_ci_spkg';
} else {
return '';
}
} else {
if (table == 'sc_req_item' || table == 'sc_request') {
return 'ref_cmdb_ci_spkg.u_importance!=^sys_class_name=cmdb_ci_spkg';
} else {
return '';
}
}
}
});