Create a dynamic search widget on service portal

Alex275
Tera Expert

Hello, 

I need to create a new homepage on service portal with specific widgets. In this page, I also need to add a search bar that can allow the user to get directly a specific contract by typing is number. 

This search bar should be dynamic like for the global search bar but it should return only results for contract. 

Is it possible to do something like that ? 

 

Thanks in advance, 

Regards, 

Alexandre

1 ACCEPTED SOLUTION

Hello, 

 

Thanks for your help ! 

For information, I succeed to do that by cloning the widget "Search Page". 

In "Option Schema" I added the field "Search Source" in the field list.

{"displayValue":"Search Source","hint":"If provided, limit the scope of the typeahead search to the given search sources","name":"contextual_search_sources","display_value_list":[],"section":"Behavior","label":"Contextual Search Sources","type":"glide_list","value":"sp_search_source","ed":{"reference":"sp_search_source"}}

find_real_file.png

After that, I just needed to create a new Search Source for contrat and add this source in my Widget configuration. Like this the widget search only in this search source. 

 

Thanks, 

Regards, 

Alexandre

View solution in original post

2 REPLIES 2

Vishal Savajia1
Kilo Sage

Hi Alex, 

 

A) This is possible, Try to clone Widget  (Search  Page or Typehead Search)  in your page. This Widgets are applied on mentioned search pages in Second image.  

B) You can use GlideRecord in Server Side Script to fetch Contract information.

 

find_real_file.png

 

find_real_file.png

Hello, 

 

Thanks for your help ! 

For information, I succeed to do that by cloning the widget "Search Page". 

In "Option Schema" I added the field "Search Source" in the field list.

{"displayValue":"Search Source","hint":"If provided, limit the scope of the typeahead search to the given search sources","name":"contextual_search_sources","display_value_list":[],"section":"Behavior","label":"Contextual Search Sources","type":"glide_list","value":"sp_search_source","ed":{"reference":"sp_search_source"}}

find_real_file.png

After that, I just needed to create a new Search Source for contrat and add this source in my Widget configuration. Like this the widget search only in this search source. 

 

Thanks, 

Regards, 

Alexandre