How to combine these two reference qualifiers

MBarrott
Mega Sage

I want to modify the dictionary override for the cmdb_ci to not include retired CI's. 

 

OOTB SNOW has the reference qualifier which I don't want to completely overwrite: sys_class_name!=cmdb_ci_service

 

To filter out retired CI's I'm using the following: javascript: 'operational_status!=6'

 

How can I combine these so both work effectively?

 

I tried javascript: 'operational_status!=6'+'sys_class_name!=cmdb_ci_service' which ended up hiding all CI's 

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

You need to join them with an AND which is ^ in encoded queries like this, and you don't need to concatenate the string since you aren't breaking it for a dynamic field or variable name from the current record.

 

javascript: 'operational_status!=6^sys_class_name!=cmdb_ci_service'

 

You can test this by manually filtering a list view by these criteria then right-clicking on the last breadcrumb to copy the query, then paste it into the qualifier.  You might not even need the javascript prefix in this case.

 

View solution in original post

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

You need to join them with an AND which is ^ in encoded queries like this, and you don't need to concatenate the string since you aren't breaking it for a dynamic field or variable name from the current record.

 

javascript: 'operational_status!=6^sys_class_name!=cmdb_ci_service'

 

You can test this by manually filtering a list view by these criteria then right-clicking on the last breadcrumb to copy the query, then paste it into the qualifier.  You might not even need the javascript prefix in this case.

 

Thank you @Brad Bowman  I knew I was making a simple mistake. Totally escaped my mind to just build it out with the filter conditioner. I also removed the javascript prefix as that wasn't required. Much appreciated!

You are welcome!