Alternative for 'IS NOT ONE OF' operator

Anurag Tripathi
Mega Patron
Mega Patron

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

-Anurag
11 REPLIES 11

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.

nino2
Tera Contributor

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.

 find_real_file.png

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)

find_real_file.png