Reference Qualifier for configuration item field in Change request form is not working as expected

VennilaP
Tera Contributor

Hi All,

 

We have to filter out the retired CIs from being selected in the change request form.We have created a reference qualifier and we have created a script include and  updated the encoded query in the script include. It was working as expected till now. 

 

Now , we have a request to update the filter as shown below :

class= hardware and install_status != retired and install_status!= absent or install_status= retired and hardware status = in stock

 

and the script include condition looks like this 

"sys_class_name=cmdb_ci_computer^install_status!=7^install_status!=100^NQinstall_status=7^hardware_status=in_stock";

 

but this brings all the retired CIs irrespective of hardware status.

 

Can you please let me know if there are any other ways to achieve this filter?

 

Thanks,

Vennila

 

 

5 REPLIES 5

Hello @VennilaP ,

 

Using operator(^NQ) in encoded queries, creates another clause for condtion builder. So If you closely check my previously given query I revomed the (^NQ) and replaced with (^OR) operatior.

If you try your query directly on cmdb_ci table list view. It will show you the difference between this operator.

 

 

******Try using SNutils as the conditions are to much to add manually in condition builder.

 

Kindly mark my answer as Correct and helpful based on the Impact.

Regards,

Siddhesh