- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2015 05:12 PM
I have to be missing something incredibly simple here. I can run a glide record query for active=true:
var rec = new GlideRecord('cmdb_ci');
rec.addQuery('active',true);
rec.addQuery('name', 'foobarbaz');
rec.query();
while(rec.next()){
gs.print(rec.sys_id);
gs.print(rec.name);
}
...Yet when I want to set active=false, there doesn't appear to be an attribute on the record, nor a column in the cmdb_ci table that I can set.
Questions:
1. What the heck am I missing?
2. Am I completely off my rocker to want to set a CI to active=false? Maybe I'm violating some core ITIL principle?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2015 05:38 PM
Active is not an oob field on the cmdb_ci table. Most use the Status field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2015 09:06 AM
Right there is exactly what we're going to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2015 01:37 AM
Use the 'operational status' field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2024 07:04 AM
Also related to this is the fact that GlideRecord - addActiveQuery() does not work with custom fields.
Note that there was this idea: Make sure that all OOTB (baseline) tables (with exception maybe of sys_*) have an active field but SN decided that it was not worth to implement this...
If this answer was helpful, I would appreciate if you marked it as such - thanks!
Best
Daniel