Where shall we use "instanceOf" operator in Service Now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 04:13 AM
Hi All,
Could any one give the real time example of "instanceOf" operator in service now, How can we use this operator and where can we use this operator
Thank you
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 04:18 AM
Hi /burra,
you can typically use it anywhere on server side to create objects, e.g.
gr instanceof GlideRecord
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 04:19 AM
You can use it for shortening or simplifying complex class filters in your reference qualifier
For example, you can use the INSTANCEOF operator for a reference field to the cmdb_ci table to specify that you want all subclasses of a class 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 alone in reference qualifier will satisfy your requirement
Thanks
PS: Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 08:59 AM
How can we use embed other variable value in the sys_class_nameINSTANCEOFcmdb_ci_server when iam trying to use like this it is not working 'sys_class_nameINSTANCEOF'+current.variables.ci_class
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2025 02:10 AM
in GlideRecord you do not have the INSTANCE OF
but use the class path