The OOB "sc-popular-items" widget relies on an aggregate query of the live sc_req_item table, with the code like the following:

var count = new GlideAggregate('sc_req_item');
count.addQuery('cat_item.sys_class_name', 'NOT IN', 'sc_cat_item_guide,sc_cat_item_wizard,sc_cat_item_content');
count.addQuery('cat_item.sc_catalogs', 'IN', data.sc_catalog);
count.orderByAggregate('COUNT', 'cat_item');
while ( && items.length < data.TopItemslimit) {
if (!$sp.canReadRecord("sc_cat_item", count.cat_item.sys_id.getDisplayValue()))
continue; // user does not have permission to see this item
var item = {};
item.count = count.getAggregate('COUNT', 'cat_item'); =;
item.sys_id = count.cat_item.sys_id.getDisplayValue();

This runs every time someone loads or reloads a page that contains the "sc-popular-items" widget. For large scale Service Catalogs this query can become very impactful on the database. A re-design is suggested in the article Speed up the "SC Popular Items" Service Portal Widget by using a snapshot possibly resulting in a much faster user experience and reduction of overall load on the database.

Another hypothetical solution would be to leverage the Platform Analytics application to store aggregate trend data to use as the source of the widget.

Steps to Reproduce

1. Clone the out-of-the-box widget "SC Popular Items" widget.
2. Use the widget in a Service Portal page that is frequently accessed.
3. Have enough tasks and sc_req_item records in the system to make the queries slow.


This problem is under review and targeted to be fixed in a future release. To receive notifications when more information becomes available, subscribe to this Known Error article by clicking the Subscribe button at the top right of this form.

The indexes listed below are needed for the widget to work. During the upgrade indexes might fail to be applied if your instance reaches the maximum number of indexes on TASK. In that case, open a Case for SN Technical Support, to move from 64 to 128 indexes and create the required indexes:

  • sys_class_name, cat_item, sys_created_on
  • sys_class_name, cat_item, order_guide
  • producer, sys_created_on

Related Problem: PRB1386320

Seen In

SR - IRM - Audit Management - New York 2019 Q3
SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - GRC Workbench - New York 2019 Q3
SR - IRM - PA Premium Integration - New York 2019 Q3
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - IRM - Risk Management - New York 2019 Q3
SR - ITOM - Discovery and Service Mapping - v1.0.35
SR - Security - Integration Framework - Madrid 2019 Q2
SR - Security - Support Common - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - CrowdStrike Intel Integration - Madrid 2019 Q1
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Splunk Enterprise Integration - New York 2019 Q3
SR - SIR - Store SecOps Setup Assistant - Madrid 2019 Q2
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3
SR - SIR - Threat intelligence - New York 2019 Q3
SR - SIR - VirusTotal Integration - New York 2019 Q3
SR - VR - Configuration Compliance - New York 2019 Q3
SR - VR - Qualys - New York 2019 Q3
SR - VR - Vulnerability Response - New York 2019 Q3

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-10-06 05:29:47