The CreatorCon Call for Content is officially open! Get started here.

How to modify default catalog items filter in Catalog Builder?

alberttagle
Tera Contributor

The default filter doesn't seem to be really make sense to our catalog builder editors, I would like to change it so whenever they go in this tab, the filter is something else.  How do I change the default filter?

alberttagle_0-1727559939561.png

 

3 REPLIES 3

Sandeep Rajput
Tera Patron
Tera Patron

@alberttagle Unfortunately, there isn't seems to be a way to adjust this filter for now. I came across a property glide.sc.builder.item_filter_mode which controls the filter depending on different persona but we can't specify default filtering using it.

Manikanta Kota
Mega Guru

Hi @alberttagle ,

We cant make modifications in that Filter conditions.

Should my answer prove to be helpful, kindly mark it as such by clicking "Accept as Solution" and "Helpful."

 

Regards,

Manikanta. Kota

thullurishalini
Kilo Guru

Hi @alberttagle To modify the default catalog items filter in ServiceNow’s Catalog Builder, 

  1. Navigate to the Catalog Builder:

    • Go to Service Catalog > Catalog Builder.
  2. Access the List Component:

    • In the Catalog Builder, locate the list component where the catalog items are displayed.
  3. Edit the Filter:

    • Click on the Edit filter option in the list component properties. This will open a modal window where you can configure the filter settings.
  4. Set the Default Filter:

    • In the filter modal, you can set the default filter criteria according to your requirements. For example, you can filter items based on specific categories, availability, or any other attribute that makes sense for your catalog builder editors.
  5. Save the Changes:

    • After configuring the filter, save the changes to apply the new default filter.

If you need to apply more advanced filtering logic, you might consider using a Catalog Client Script to set the default filter value for a field. Here’s a basic example:

function onLoad() {
    var filter = 'active=true^category=hardware';
    g_form.setFilter('catalog_items', filter);
}

This script sets a filter where only active catalog items in the “hardware” category are displayed.