How to make Group By cases in table API

lucky6
Tera Contributor

Hi Everyone,

How can we make group by cases in table API.

10 REPLIES 10

Hi,

please find the below query

active=true^GROUPBYcontact

Hi,

I got your point here, but it is working only when assigned to is some person but i want group by like x, xyz, xyzy like that..is it possible?

Hi,

you can add additional group by as well in the Aggregate API

Endpoint: https://instanceName.service-now.com/api/now/stats/incident?sysparm_query=active%3Dtrue%5Eassigned_to%3D6816f79cc0a8016401c5a33be04be441&sysparm_count=true&sysparm_group_by=assigned_to,caller_id

Output:

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@lucky 

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@lucky 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

If not, please let us know if you need some more assistance.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader