- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2017 07:11 AM
The Service Portal search results return in this sequence.
We would like to change the sequence (Left Box) to Service Catalog, Knowledge Base and Question and Answers. Also the search results (list window on right) in the same sequence. Our goal is to direct users to the Service Catalog first. I found sys.properties "glide.service_portal.default_search_sources" and changed it to the sequence we want but it does nothing or is overwritten.Thanks in advance. Jim
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2017 11:38 AM
You would have to clone and modify the Search Page widget.
In the HTML template, change:
<div role="listitem" ng-repeat="item in data.results | orderBy:'score':true | limitTo:data.limit" class="panel-body b-b ">
to
<div role="listitem" ng-repeat="item in data.results | limitTo:data.limit" class="panel-body b-b ">
In the server script, add orderBy call to this piece of code:
} else {
var m2mSearchSourceGR = new GlideRecord("m2m_sp_portal_search_source");
m2mSearchSourceGR.orderBy('order'); // <<-- ADD THIS LINE
if (data.t)
m2mSearchSourceGR.addQuery("sp_search_source.id", data.t);
m2mSearchSourceGR.addQuery("sp_portal", $sp.getPortalRecord().getUniqueValue());
m2mSearchSourceGR.query();
while(m2mSearchSourceGR.next()) {
var searchSourceGR = m2mSearchSourceGR.getElement("sp_search_source").getRefRecord();
data.resultTemplates["sp-search-source-" + searchSourceGR.getValue("id") + ".html"] = $sp.translateTemplate(searchSourceGR.getValue("search_page_template"));
getResults(searchSourceGR);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2017 01:11 PM
I believe modifying this one is a little more confusing to me.
The homepage search uses the Typeahead widget and I notice the Client Controller code has an orderby line of code in it shown here:
So that appears to be using 'score' like the previous widget you mentioned earlier in this thread. Then looking at the Homepage Search widget, shown below, it calls that Typeahead search widget....
So would I clone both the Typeahead widget and the Homepage Search widget and modify the Typeahead to look at "order" instead of score, then modify the Homepage Search widget to look at my cloned Typeahead widget? Just seems a little much to accomplish this.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 03:10 AM
Hi Nia,
In Typeahead search widget - while we search for keyword as "change" this displays all the Standard change templates as well, is there a way to restrict the change template not being displayed in the Search. Please share your inputs.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 07:31 AM
Hi renuka,
Try this...
Go to the Portal record that you're interested in - [Service Portal > Portal] in the menu - and click into it to open the Portal record. At the bottom, you'll see the search sources:
Open the Service Catalog search source and modify the 'Data fetch script' to exclude the items that you don't want coming up as part of the search results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2018 12:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2017 09:01 PM
Is there a way to order it by the order of the search sources and then also by the Zing score?