The Zurich release has arrived! Interested in new features and functionalities? Click here for more

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

Artemis15
Kilo Guru

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

3 REPLIES 3

rush1
Kilo Contributor

Any inputs on how to use this one?



We are also looking to have total count of records.


No, didn;t find anything solid about this.


PrashantLearnIT
Giga Sage

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
********************************************************************************************************