cmdb_ci_service
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2025 05:02 AM
Hi Team
I have one script include is applied in the service field of change request where some filters are applied through the script on the cmdb_ci_service on table and i want to and one more condition where i want add the filter the to visible only operational services so attaching the screenshot and also i was checking the exact filter on table i could not able to replicate please help me here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2025 06:07 AM
Hi @Snehal ,
If you want to add your new query in addition to the existing query, write
conditionGR.addEncodedQuery('operational_status=1')
Write it below the other encoded query.
Regards,
Ehab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2025 05:55 AM
Hi @Snehal ,
Typically:
The field operational_status is used.
The value for Operational is usually 1 (Operational), depending on your instance.
You can verify this by looking at the dictionary for cmdb_ci_service.operational_status.
updated script incldue
serviceConditions: function() {
var serviceSys_ids = [];
var conditionsGr = new GlideRecord('cmdb_ci_service');
// Add operational_status filter (value 1 = Operational)
conditionsGr.addEncodedQuery(
'install_statusNOT IN100,7^' +
'ref_service_offering.service_classification=Application Service^' +
'ORref_service_offering.service_classification=Business Service^' +
'NQsys_class_name=cmdb_ci_query_based_service^' +
'ORsys_class_name=cmdb_ci_service_business^' +
'ORsys_class_name=cmdb_ci_service_discovered^' +
'ORsys_class_name=cmdb_ci_service_technical^' +
'^operational_status=1'
);
conditionsGr.query();
while (conditionsGr.next()) {
serviceSys_ids.push(conditionsGr.sys_id.toString());
}
return 'sys_idIN' + serviceSys_ids;
}
Testing
Go to the cmdb_ci_service.list
Apply the same addEncodedQuery() in a filter and test it out in the list view.
Ensure the operational_status=1 is working and bringing expected results.