When searching for Content Items (sc_cat_item_content) records from Service Portal using the typeahead search widget, the icon associated to the sc_cat_item_content record does not get displayed. Icons associated to Catalog Items also display fine in the Service Portal search.   

Steps to Reproduce

  1. Go to the Content Items (sc_cat_item_content) list and create a new record or open an existing one.

  2. Make sure that the Picture field has an image attached to it.

  3. Go to Global Search and search for the content item.

    Note that the icon displays in the returned search result.

  4. Go to Service Portal and enter the content item name in the typeahead search.

    Note that no icon is displayed next to the returned typeahead search result.



Note – The following changes are in the attached'sp_search_source_c96eb1686721220023c82e08f585efff.xml file, so importing this file into the instance will resolve this issue.

Check the following procedure for details about the fix for this issue.

  1. Go to sp_search_source.list and open the sp_search_source record with Name=Service Catalog

  2. In the Service Catalog Search Source, add 'icon' to the $sp.getRecordDisplayValues list in the Data fetch script section in line 33:

    $sp.getRecordDisplayValues(item, sc, 'name,short_description,picture,icon,price,sys_id,sys_class_name');

  3. Add the following line to the Typeahead template section of the same sp_search_source record for Service Catalog: 

    <i class="ta-img" ng-if="match.model.type=='sc_content' && match.model.content_type != 'kb' && match.model.icon" style="background-image:url('{{match.model.icon}}')"></i>

Related Problem: PRB1262997

Seen In

There is no data to report.

Intended Fix Version


Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-09-25 05:00:57