Alternative for 'IS NOT ONE OF' operator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2019 04:55 AM
Hi,
I have a set of CIs(90) and there is no way to get them through query, it is a list and we have to just use it as is.
I have to add it to SLA definition in a way that SLA does not attach if the CI is in that list. There is no option for using the operator 'is not one of' else my life would be simple.
Any suggestions?
-Anurag
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2019 06:09 AM
Yeah i hate adding new fields for stuff like this. Short of adding 90 conditions for 'ci is not x' i can't think of any other way to do it though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2020 02:15 AM
Hi Anurag,
While the operator not one of / NOT IN is not available here, you can manually edit the query and use it. In this example it is in the browser url itself:
/cmdb_ci_list.do?sysparm_query=sys_idNOT%20IN8df3a804dbd20410076ef9c41d96191b%2C8df3a804dbd20410076ef9c41d96191b%2C8df3a804dbd20410076ef9c41d96191b
Once the page is refreshed, you can do any future changes like usual, except its a rather small input field.
for a query it would be simpy "NOT IN":
sys_idNOT IN8df3a804dbd20410076ef9c41d96191b,8df3a804dbd20410076ef9c41d96191b,8df3a804dbd20410076ef9c41d96191b
There are plugins which let you edit a query by double clicking on it like SN Utils.
(here i had to show technical names so i could double click on it)