Record count in database view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 12:54 PM
How to create a record count in database view? I can't do this with core reports.
The record should include these fields
|
- Labels:
-
Reporting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 01:34 PM
// getCount : function(){
var queryString = 'state=1'
var gr = new GlideAggregate('incident_db_view'); //GlideAggregate query
gr.addAggregate('count');
gr.orderByAggregate('count');
gr.addEncodedQuery(queryString);
//gr.groupBy('priority');
gr.query();
var incidentCount;
while(gr.next()){
incidentCount = gr.getAggregate('count');
}
gs.log(incidentCount);
//return incidentCount;
// }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2021 03:16 PM
https://community.servicenow.com/community?id=community_question&sys_id=192517551b3d78540b8a9979b04bcbd0
can you help me with this question?