Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.

The INSTANCEOF operator in reference qualifiers

Log in to subscribe to topics and get notified when content changes.

The INSTANCEOF operator in reference qualifiers

You can use the INSTANCEOF operator in a reference qualifier to shorten or simplify a complex class qualifier.

For example, use the INSTANCEOF operator for a reference field to the cmdb_ci table to specify that all subclasses of a class are included in the results. The following reference qualifier returns all servers, including Linux, UNIX, Windows, and so on, because each of those subclasses extend the cmdb_ci_server class.

sys_class_nameINSTANCEOFcmdb_ci_server

In another example, you can simplify the following reference qualifier in a similar way.

 u_active=true^sys_class_name=cmdb_ci_acc
^ORsys_class_name=cmdb_ci_computer
^ORsys_class_name=cmdb_ci_server
^ORsys_class_name=cmdb_ci_win_server
^ORsys_class_name=cmdb_ci_unix_server
^ORsys_class_name=cmdb_ci_linux_server
^ORsys_class_name=cmdb_ci_appl
^ORsys_class_name=cmdb_ci_netgear

Using the INSTANCEOF operator, the reference qualifier is rewritten as follows because the server subclasses extend the cmdb_ci_computer class.

 u_active=true^sys_class_name=cmdb_ci_acc
^ORsys_class_nameINSTANCEOFcmdb_ci_computer
^ORsys_class_name=cmdb_ci_appl
^ORsys_class_name=cmdb_ci_netgear
Feedback