The Now Platform® Washington DC release is live. Watch now!
Sometimes when you're writing a script, you need to query one table but get results based on fields in another, related table. For example, you might want to query for NICs on Windows servers. The NIC table itself doesn't know what kind of CI it's related to — that information is in the related CI. You can do this with filters, but how do you do it in script?
Here's how (using the example above):
var gr = new GlideRecord('cmdb_ci_network_adapter');
gr.addQuery('cmdb_ci.sys_class_name', 'cmdb_ci_windows_server');
gr.query();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.