How to configure Service portal Typeahead Search widget? as per our requirement?

Thousif S N2
Tera Contributor

I need to create a search widget , so i am using Typehead search widget so how do i configure so that i can search the records from a particular table? I am new to portal so please anybody help me out?

3 REPLIES 3

AbhishekGardade
Giga Sage

Details are provided in serviceNow docs:

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/build/service-portal/concept/typ... 

Contextual Search SourcesLimit the results available in the typeahead search by only configuring specific search sources. For example, users searching in the Service Catalog only see results for the Service Catalog when that search sources is configure. For more information on contextual search, see Configure Search Sources available on a page

 

OR

Search sources are defined in specific portal, for service portal go to portals from application navigator and select select SP

 

You can remove the search sources which are not required and make necessary changes in "knowledge base" search source to search only the category you want.

 

Thank you,

Abhishek Gardade

Thank you,
Abhishek Gardade

Pratiksha Kalam
Kilo Sage

Hello,

you have to clone OOB widget then you can try to use below scripts,

Remove the some part which are not required to you.

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/build/service-portal/concept/adv...

https://community.servicenow.com/community?id=community_question&sys_id=29a50370db447f0ca39a0b55ca96...

 

Thanks,

Pratiksha

amaradiswamy
Kilo Sage

Hi,

1. Create a search source for the table as mentioned by Abhishek

2. Now, ctrl+right click on the widget and select that search source in widget instance options. After this change, the search widget will only show the records returning from the search source.

find_real_file.png

or another way is to add the JSON format in widget instance when opened the page using "Page Editor"

https://hi.service-now.com/kb_view.do?sysparm_article=KB0696029