Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
How to exclude a catalog item from appearing in the popular items list on Service Portal - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How to exclude a catalog item from appearing in the popular items list on Service Portal
KB0750153

How to exclude a catalog item from appearing in the popular items list on Service Portal


3369 Views Last updated : Jun 18, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

Learn how to exclude a catalog item from appearing in the popular items on Service Portal.

 

Release

Any supported release including Madrid, London, and Kingston.

Resolution

The SC Category page widget retrieves Popular Items through its getPopularItems function, which builds the query in its server script.  

To exclude items from the query results list, you need to:

  1. Create a new boolean field in the Catalog Item [sc_cat_item] table.
  2. Clone the SC Category Page [sc-category] widget 
  3. Add the new field to the query.

Detailed example

In the SC Category Page [sc-category] widget: 

  1. Create a new field named Exclude from popular items: [u_exclude_from_pop_items]. By default, this field is set to false. 
  2. For each item you want to exclude, set the Value of this field to true.
  3. Clone the widget.
  4. Modify the count variable created in the server script that holds the query using the following code. In the Madrid release, this is found on line 164 and redefined for record producers on line 191.

    [code]<code>count.addQuery('u_exclude_from_pop_items',false);</code>[/code]

  5. After you update the cloned widget, swap the default version of the widget for the custom version. 

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.