logo

NJP

Enable Record producer search configuration

Import · Jul 18, 2022 · article

We can enable search configurations on Record producer(s) variables so that when users enter data into a variable,

they can access related search results such as articles/catalog items.

Record producer configurations are available in Service Now to enable this functionality. I'll walk you through how to use

this functionality in this article.

  • In Application navigator, Go to Contextual search > Record producer configuration
    image
  • Go to Record producer configuration table and click New
    1.) Record producer - Give the Record producer name2.) Search context - Give the context from which you want to populate the related results, In OOB we have few search contexts available for us, We can also create a custom context.3.) Search variable - Give the variable on which you wanna enable the search context
    image
  • The following Search Action configurations related listsare automatically populated based on the search context
    image
  • Create a custom variable after the variable on which you want to enable Related search results.
    image
  • Let us now put our functionality to the test.
    image
  • If you're unable to see the "Order" button do the following
    1.) Go to the Angular templates(sp_ng_template) table and Locate cxs-result-catalog
    2.) Replace the below existing line , Add the order at end of the {{orderActionDetails(result).actionLabel}}Below is the updated HTML
    <a class="btn btn-default sc-btn" ng-href="{{result.related_links[0].sp_link+'&referrer=contextual_search'}}" ng-attr-aria-label='{{i18n.format(c.data.i18nMsgs.catalog.order, result.title)}}'>{{orderActionDetails(result).actionLabel}}Order</a>

Pointer: Only one variable within a record producer can use contextual search.

Sources: Define contextual search

Context Search on a Catalog Item - Button Text Issue

If you have any corrections or suggestions, please leave them in the comments section.

Regards,

Sai Kumar

Labels:

image

View original source

https://www.servicenow.com/community/itsm-articles/enable-record-producer-search-configuration/ta-p/2305383