Group by view in service portal?

Sunita Panigrah
Tera Contributor

Hello,

Could anyone please let me know if group by view is possible in service portal?

Thanks & Regards,

Sunita

5 REPLIES 5

Community Alums
Not applicable

Hi @Sunita Panigrahi ,

There is no direct way or OOTB way to achieve this, i think.

As a work around, you can go with using a the Icon Menu List widget on the portal and create pages to the exact data needed.

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Community Alums
Not applicable

Hi @Sunita Panigrahi ,

Any update to this ?Any follow-up required? if not

Kindly mark the answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep

Bhaba
Tera Expert

Hi @Sunita Panigrahi 

Yes, it is possible to group by records in portal. You'll need to add GlideAggregate the record in the server side of the widget script. Something like the below script.

var agg = new GlideAggregate('your-table-name');
agg.addAggregate('COUNT', 'category');
agg.groupBy('category');
agg.addQuery('sys_created_on', '>=', 'javascript:gs.beginningOfLast12Months()');
agg.query();
while (agg.next()) {
    //do things on the results
    var category = agg.getValue('category');
}

Hope this helps you.

Thanks.

Hi @Bhaba ,

Thank you for your time.

I want to have group by view which we see in native UI in service portal as well.

Thanks & Regards,

Sunita