- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2022 09:48 PM
Hello All,
I do not understand what the difference is between getRowCount and getAggregateCount. can anyone please guide me on this?
Thank You.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2022 10:36 PM
Hi @Sagar_pawar ,
getRowCount - Used to get the Row count but it is not recommanded for any aggregate operation use GlideAggregate.
GlideAggregate
GlideAggregate used to do database aggregation operations(Count, Min, max, sum, AVG, etc..)
Refer below link for GlideAggregate methods with examples.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2022 10:36 PM
Hi @Sagar_pawar ,
getRowCount - Used to get the Row count but it is not recommanded for any aggregate operation use GlideAggregate.
GlideAggregate
GlideAggregate used to do database aggregation operations(Count, Min, max, sum, AVG, etc..)
Refer below link for GlideAggregate methods with examples.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2022 11:16 PM
Hello Abhi,
getRowCount() method from GlideRecord and getAggregate('COUNT') method is from GlideAggregate class.
For more details you can go through below document:
Difference between GlideRecord() and GlideAggregate()
Please mark the answer correct/helpful accordingly.
Regards,
Vaibhav