Typeahead search box in service portal should display the search results based on search source.

yogesh_rajendra
Tera Contributor

My Requirement:

I have combined the cmdb_ci_service and sc_cat_item table in to a custom table and i have used that custom table in service portal search source to provide search results from both of the table. when i tried to search, it displays the search result and if i click that search result link it navigates to the custom table form view but i need to display the catalog item order page.

custom table:-

find_real_file.png

portal search:-

find_real_file.png

Custom table Form view:

find_real_file.png

I need this order page view:

find_real_file.png

4 REPLIES 4

Gurpreet07
Mega Sage

This is because in the search source the 'primary display field' you have selected is a reference field. There is an issue in snow that its not displaying the display value for reference fields if its a primary display field. You could customize the search source to get this working.


1. Include the primary display fields along with fields as well.


2. Edit   Search page template for primary field for below line


ng-bind-html="highlight(item.fields.reference_field_name.display_value)"


This is how we modified for document_id field of approval record



find_real_file.png  


Hi Gurpreet,


Search result displays an empty result. Am not getting that sys_id.


Seems you want to change the page in which search result opens.


Changes against Search Group


1. Search page template make below change


. find_real_file.png


2. Scroll down on the search source and switch to tab typeahead and make below change


find_real_file.png


Hello,

 

I know this is not relevant here, but just curious to know how to highlight multiple words in articles search.

 

For ex: Webex access

should highlight(webex and access) webex account access.   from the name of article. 

if they are right next to each other they get highlighted but if they are not it doesn't work.

 

Any help would be appreciated!