How to customize widget "Knowledge Field Facet" in order to exclude records from the "knowledge bases" filter section

michelen
ServiceNow Employee
ServiceNow Employee

Hi,

I have the requirement to change the widget "Knowledge Field Facet" available in in page "kb_search". The customer would like to remove some of the knowledge bases available in the filter section called "Knowledge bases" (see below image). 

find_real_file.png

Any idea/suggestions on how to customize it?

Thanks!

1 ACCEPTED SOLUTION

In that case, I think you're better off just going back to the older KB pages to show just a single knowledge base.  The facet widgets are tied into that KB search page in multiple ways.  Unfortunately, there's not a simple way just to turn off a knowledge base from what I can see.  You can remove the base listing from the facet widget (which I've done) but the problem is the search form and the results page are designed to be tied into the facets as well.  That means that there are several interactions there (clearing filters, searching on anything) that will end up displaying knowledge from all bases.  That's just what the newer functionality is designed to do.  The old way is a better way to display single pages with a single knowledge base.

View solution in original post

3 REPLIES 3

Mark Stanger
Giga Sage

I don't see an easy way to do this, unfortunately.  I would argue that if they are able to see the content in the knowledge base then it shouldn't matter where they view that knowledge (Service Portal or otherwise). 

If you can agree on that then your solution would simply be to restrict the 'Knowledge Base' record itself by User Criteria in the 'Can Read' and 'Can Contribute' related lists at the bottom of the 'Knowledge Base' form.  If users are restricted from viewing an entire knowledge base with user criteria they will not see that knowledge base available in the service portal.

Mark, thanks for the quick reply!

The actual expectation is to duplicate the page, make it available in another section of the header menu and show only one specific knowledge base (and removing the same knowledge base from the "kb_search" page). I totally agree with your approach but setting the user criteria would not help in this case.

A possible solution would be a widget with a list of all the knowledge articles belonging to that sapecific knowledge base, without filters, but there would be still the problem of removing that knowledge base in the "kb_search" page.

In that case, I think you're better off just going back to the older KB pages to show just a single knowledge base.  The facet widgets are tied into that KB search page in multiple ways.  Unfortunately, there's not a simple way just to turn off a knowledge base from what I can see.  You can remove the base listing from the facet widget (which I've done) but the problem is the search form and the results page are designed to be tied into the facets as well.  That means that there are several interactions there (clearing filters, searching on anything) that will end up displaying knowledge from all bases.  That's just what the newer functionality is designed to do.  The old way is a better way to display single pages with a single knowledge base.