- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 12:24 PM
Hello everyone,
On our Portal we have a catalog called Links which houses a ton of content items that lead to various things (applications, department homepages, etc.). We have created a category called *Essential* which contains duplicate content items that our end users are most likely to be interested in. However, since these content items are duplicates, these duplicates also show up in the search bar.
We thought that toggling "No search" would bar the Essential links from the search bar yet keep them in the Catalog, but it looks like it removes them from both (though strangely the item count still appears next to the category name). Does anyone have any ideas on how we can fix this?
Thank you!
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 08:28 AM
Hi,
You can update the scriptt as mentioned below, just add the sys_id of the category you want to omit from seaching.
sc = new sn_sc.CatalogSearch().search(portalValue, '', query);
sc.addQuery('sys_class_name', 'NOT IN', 'sc_cat_item_wizard');
// Replace sys_id with the category sys_id that should not be included in search
sc.addEncodedQuery('hide_sp=false^ORhide_spISEMPTY^category!=sys_id');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 12:51 PM
Why not deactivate all duplicates? You can place an item in multiple catalogs and within each put the best fitting category - this will yeild 1 result
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 01:25 PM
Unfortunately, we can't take this route because all of the links are within a single catalog called Links. We would like our "ServiceNow" link to be under the Essential category, but we would also like it to be under Applications as well - hence the need for the duplicates. We just don't want "ServiceNow" to come up twice in the search bar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2022 11:58 AM
Hi
You can go to portal record and configure the search source for the catalog to exclude the required category while performing the search.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2022 07:36 AM
We thought that might be the solution, but unfortunately we're pretty bad at writing JavaScript code XD
We think that these may be the lines to edit though. Do you have any suggestions on how we could modify this?
sc = new sn_sc.CatalogSearch().search(portalValue, '', query);
sc.addQuery('sys_class_name', 'NOT IN', 'sc_cat_item_wizard');
sc.addEncodedQuery('hide_sp=false^ORhide_spISEMPTY');