Filter Service Offerings by Operational status - Reference qual
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2022 05:44 AM
Hi,
I want to add one more filter to Reference qual for field Service offering in Incident form. Now it looks like:
And I was trying to add operational_status=1 in the beginning or at the end but it doesn't work..
I was trying with:
javascript: 'operational_status=1' : ['incident', 'problem','change_request'].indexOf(current.sys_class_name + '') == -1? '' : FilterServiceByCI(current.cmdb_ci)
javascript: 'operational_status=1' + ['incident', 'problem','change_request'].indexOf(current.sys_class_name + '') == -1? '' : FilterServiceByCI(current.cmdb_ci)
javascript: ['incident', 'problem','change_request'].indexOf(current.sys_class_name + '') == -1? '' : FilterServiceByCI(current.cmdb_ci) + 'operational_status=1'
javascript: ['incident', 'problem','change_request'].indexOf(current.sys_class_name + '') == -1? '' : FilterServiceByCI(current.cmdb_ci) : 'operational_status=1'
Thanks in advance for help how can I achieve this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2022 06:33 AM
Hi Kasia,
Have you tried adding a ^
javascript: ['incident', 'problem','change_request'].indexOf(current.sys_class_name + '') == -1? '' : FilterServiceByCI(current.cmdb_ci) : '^operational_status=1'
Is the FilterServiceByCI a custom script or OOTB? Does it return a query string?
Hope this helps
Shane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2022 01:22 AM
Thank you for response. I was trying with your solution but it also doesn't work 😞
FilterServiceByCI is a custom script I think, when CI in another field is selected then in field Service should be only service offerings related to this CI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2022 01:47 AM
Ok, I found the solution 🙂 There should be:
javascript: ['incident', 'problem','change_request'].indexOf(current.sys_class_name + '') == -1? '' : FilterServiceByCI(current.cmdb_ci) + '^operational_status=1'
instead of:
javascript: ['incident', 'problem','change_request'].indexOf(current.sys_class_name + '') == -1? '' : FilterServiceByCI(current.cmdb_ci) : '^operational_status=1'