We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Need to exclude all the business applications from the CI field

abigailtaba
Tera Expert

javascript: current.sys_class_name == 'cmdb_ci_batch_job'? 'cmdb_ci.sys_id=cmdb_ci_batch_job.batch_job' : ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1? '' : 'operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join()

 

 

This is the recent code, any idea how to exclude the business application from the results?

1 ACCEPTED SOLUTION

Tushar
Kilo Sage

Hi @abigailtaba 

 

can you please try below -

 

current.sys_class_name == 'cmdb_ci_batch_job'
  ? 'cmdb_ci.sys_id=cmdb_ci_batch_job.batch_job'
  : (current.sys_class_name == 'business_application'
    ? ''
    : ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1
      ? ''
      : 'operational_status NOT IN ' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join())

 

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

Regards,
Tushar

View solution in original post

1 REPLY 1

Tushar
Kilo Sage

Hi @abigailtaba 

 

can you please try below -

 

current.sys_class_name == 'cmdb_ci_batch_job'
  ? 'cmdb_ci.sys_id=cmdb_ci_batch_job.batch_job'
  : (current.sys_class_name == 'business_application'
    ? ''
    : ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1
      ? ''
      : 'operational_status NOT IN ' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join())

 

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

Regards,
Tushar