How to use X-Total-Count in Table API?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2014 03:00 AM
Hi,
I am using Table API for integration of Service-Now. I have a condition that if returned data is more than 5000 than I have to make another call.
I read Table API and there i found X-Total-Count, according to documentation, it returns total number of records returned by the query. But, unfortunately i am not able to use it.
Thanks,
Akash Rajput
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2015 01:48 PM
Any inputs on how to use this one?
We are also looking to have total count of records.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2015 07:42 PM
No, didn;t find anything solid about this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2015 10:46 PM
Hi Akash,
You can use getRowCount(); as shown in below example..
var gr = new GlideRecord('incident')
gr.query();
gs.info("Records in incident table: " + gr.getRowCount());
Thanks
Prashant
plz mark correct if i helped you..
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************