Customizing ServiceNow's "Faceted Search" Widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2023 08:08 AM
I am currently working on a ServiceNow project where I have a requirement to customize the out-of-the-box (OOTB) "Faceted Search" widget. However, I have encountered a challenge: the default "Faceted Search" widget is not modifiable, regardless of the application scope I am in.
To address this, I cloned the "Faceted Search" widget and attempted to drag it into the page designer, with the intention of replacing the OOTB "Faceted Search" widget on the page. My objective is to display both "Requests" and "Knowledge Base (KB)" results simultaneously, and to categorize them into sections instead of using the default tab format.
In the process of customization, I came across an Angular template embedded within the HTML part of the widget, where the OOTB ng-template ID could not be located on the table. This raised a concern: Is it best practice to clone and modify the "Faceted Search" widget in ServiceNow? Given that this OOTB widget is unmodifiable by default, I am seeking advice on the appropriate approach to take in this situation.
I would appreciate any guidance or recommendations on how to proceed with this customization while adhering to best practices in ServiceNow development.
- Labels:
-
Architect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2023 08:12 AM
Hi @Community Alums ,
Yes, base widgets are read-only so you have to clone them if you want to build on their functionality.
https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/build/service-portal/task/t_CloneAndEditAWidget.html
Regards,
Niklas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2023 08:29 AM
Thank you for your response.
I completely agree. I typically clone the out-of-the-box (OOTB) widgets whenever I need to use or modify them. However, I've noticed something unusual about the OOTB "Faceted Search" widget. Despite my usual practice, this widget appears to be unmodifiable by default. I am unsure if ServiceNow recommends developers to modify it.
Additionally, I observed that in the HTML part of the widget, there are some Angular template IDs which appear to be hidden or inaccessible. I couldn't find the file for the corresponding ng-template in any table records generated from the script. This has raised some concerns, and I am currently uncertain whether to proceed with customizing this widget.
I would appreciate any further insights or recommendations on how to handle this situation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 12:14 AM
Hi @community Alums,
I would also need to modify the "Faceted Search" widget (some branding needs to be done), but have experienced the same problem that you described (after cloning, there is no container to be found on the page where the original widget could be removed and the cloned widget could be inserted).
Did manage to solve the issue somehow?
Thanks a lot in advance for your help.