CI Reference Qualifier on Incident Form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2019 10:40 AM
I am not seeing the CIs I expect on the Incident form when I click the lookup icon next to the Configuration Item field, and I may want to change it.
The current advanced reference qualifier (OOB) is set as below.
I am having trouble interpreting it. Can someone describe please?
javascript: ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1? '' : 'operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join()

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2019 10:47 AM
Following checks, if the table current name is incident or problem
['incident', 'problem'].indexOf(current.sys_class_name + '') == -1?
If the above condition is true, it queries all the CIs with operation status = OpsStatusFilter('cmdb_ci').by('CreateTask').join()
OpsStatusFilter is a script include and by is a function inside it. This function will return a list of operational status of cmdb_ci table.
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2019 05:06 AM
Hi,
Have a question about this new Reference qual of the Configuration Item field, do you know how to add an additional condition that should work in "OR" in the OOTB one?
In details, this is the condition to be added:
'company='+current.account
I've tried already with this, but it's not working as expected:
javascript:'company='+current.account + '^NQ' + ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1? '' : 'operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join()
Thanks a lot for your help.
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2019 09:00 AM
I have similar requirement...let me know if you found any solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2020 02:55 PM
I think we need to append additional qualification at the end of the existing qualification.
For example following is what worked for me:
javascript: ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1? '' : 'operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join() + '^sys_class_name!=service_offering'