We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

CMDB Ci reference qualifier

RushithaD
Kilo Contributor

I do have  requirement where when i click the ci in any incident, problem and change request , it should only show the principal classes. Need further details on what filters are applied for Configuration items 
Where the OOB reference qualifier is working  in PDI where as it is not working my company instance, where both reference qualifier are same, not sure, in the PDI it is displaying all the records where in the company instance. There is 19.9M CIs in CMDB_CI table but only 7.2M show here

@Ankur Bawiskar Can you please help me or explain how the OOB reference qualifier works

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

in the incident or task table.

 

2 REPLIES 2

Ankur Bawiskar
Tera Patron

@RushithaD 

the OOTB works like this

if the current table is incident or problem then it excludes CI records whose operational_status is in the list returned by new OpsStatusFilter('cmdb_ci').by('CreateTask').join()

for any other table it returns an empty qualifier, meaning no extra filtering

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Tanushree Maiti
Tera Patron

Hi @RushithaD 

 

Refer post : I Want to show the list of principal class CI's in the configuration item field in incident, change 

https://www.servicenow.com/community/itsm-forum/quot-configuration-item-quot-lookup-field-on-a-chang...

 

  • The System property com.snc.task.principal_class_filter dictates which task types utilize this restriction. You need to add incident, problem, and change_request to this comma-separated list.
  • CIs that are marked as Non-Operational (like in maintenance, decommissioned) should be filtered out
  • The OOTB reference qualifier script is

                  javascript:new TaskUtils().getConfigurationItemFilter(current);  

              which ensures that the selected CIs are valid for the specific service management task

  • Only CIs where Active = true are available for selection. Retired or disposed CIs are automatically excluded.

 

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti