Skip to content

Commit d4c710e

Browse files
authored
Create code.js
1 parent fe54e3f commit d4c710e

File tree

1 file changed

+10
-0
lines changed
  • Core ServiceNow APIs/GlideAggregate/non_operational_ci_count

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var ga = new GlideAggregate('cmdb_ci_appl');
2+
ga.addQuery('operational_status', 2); // Non-operational
3+
ga.addQuery('install_status', 1); // Installed
4+
ga.addAggregate('COUNT');
5+
ga.query();
6+
var total = 0;
7+
if (ga.next()) {
8+
total = ga.getAggregate('COUNT');
9+
}
10+
gs.info('Application CIs installed but not in operational count: ' + total);

0 commit comments

Comments
 (0)