Include Defect, Enhancement, Incident in Service Portal Search

madanm7786
Mega Guru

Hi All,

I am working on a requirement to allow search for defects, enhancements and incidents in Service Portal Search.

Based on the below blog,

https://community.servicenow.com/community?id=community_blog&sys_id=de5ce6a1dbd0dbc01dcaf3231f96194a

I configured incident table in Search Source in my Portal.

find_real_file.png

find_real_file.png

 

But when  i search for incident number in service portal, it is not working.

Please help me on this.

Thanks,

Maddy

4 REPLIES 4

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,


Make sure you edit code in search sources and include incident as a tale for search.

If you open Service Catalog Search Source you will see script in it as line seven if you see var sc = new GlideRecord('sc_cat_item');

so similarly we have to use incident table as well. This is applicable if you are using Script if not then use normal condition.

 

Can you show how you configured it.

 

 

Thanks,
Ashutosh Munot

Hi Ashutosh,

I am not using scripted source, its a basic configuration.

Refer below screen shots,

find_real_file.png

 

find_real_file.png

Thanks,

Maddy

HI,


You also have to edit Search page. 

See below page code:

HTML:

<div class="list-group">
<a ng-class="{active: !data.t}" class="list-group-item" ng-href="?id=search&q={{data.q}}"><i class="fa fa-chevron-right"/><span class="m-l-sm">${All}</span></a>
<a ng-if="data.hasKB" ng-class="{active: data.t=='kb'}" class="list-group-item" ng-href="?id=search&t=kb&q={{data.q}}"><i class="fa fa-chevron-right"/><span class="m-l-sm">${Knowledge Base}</span></a>
<a ng-if="data.isLoggedIn && data.hasCatalog" ng-class="{active: data.t=='sc'}" class="list-group-item" ng-href="?id=search&t=sc&q={{data.q}}"><i class="fa fa-chevron-right"/><span class="m-l-sm">${Service Catalog}</span></a>
<a ng-if="data.isLoggedIn" ng-class="{active: data.t=='incident_search'}" class="list-group-item" ng-href="?id=search&t=incident&q={{data.q}}"><i class="fa fa-chevron-right"/><span class="m-l-sm">${Incident}</span></a>
<a ng-if="data.sqandaEnabled" ng-class="{active: data.t=='qa'}" class="list-group-item" ng-href="?id=search&t=qa&q={{data.q}}"><i class="fa fa-chevron-right"/><span class="m-l-sm">${Questions and Answers}</span></a>
<a ng-repeat="group in data.searchGroups" ng-class="{active: data.t==group.table}" class="list-group-item" ng-href="?id=search&t={{group.table}}&q={{data.q}}"><i class="fa fa-chevron-right"/><span class="m-l-sm">{{group.label || group.table}}</span></a>
</div>

 

See below screen shot.

find_real_file.png

Hi Ashutosh,

I checked in my personal developer instance. It is working without any changes to the Search Page Template, it is in Kingston Instance.

find_real_file.png

 

But in our instance, it is still not working, it is in Jakarta instance.

find_real_file.png

I also tried to edit the search page template. But still not working.

 

Thanks,

Maddy