Define contextual search to display search results in a table, such as the form for the Incident table.
Before you begin
Role required: admin
About this task
In Contextual Search > Table Configuration, you can configure the form that is associated with a table to display contextual search results. You specify where the search results appear, the information the results contain, and what the user can do with the results.
When knowledge articles are associated with a record, those search results can be included in email notifications. For example, email notifications sent when an incident is created can include knowledge search results. An article in the search results may help the user who raised the incident resolve the issue independently.
In the table configuration record, specify which fields on the form trigger a search. For example, contextual search in the Incident form can display search results based on text entered in the Short description field.
Procedure
In the Search Context form, open the Table Configurations related list and click New.Alternatively, navigate to Contextual Search > Table Configuration and click New.
Complete the form.Table Configuration fields
Field Description Table Name of the table name associated with the form, for example, Incident [incident].Note: The list shows only tables and database views that are in the same scope as the contextual search. Search context Name of the search context this table configuration applies to. Results header text Label for the search results area that appears in the form. KB attachment How a KB article in search results is embedded in the Comments field on the form.Embed article: The article text is copied into the Comments field in HTML format.Embed link to article: A link to the article is posted in the Comments field. Active Check box to activate this configuration. Limit Maximum number of search results returned. Results per page Number of results to display per page. Allow expand/collapse Check box to allow the user to collapse the search results in the form. Result action label Label of the action button that appears when the user opens a search result record. By default, this label is set to This Helped. Result action value Internal value of the action button that appears when the user opens a search result record. By default, this value is set to This helped. This value is stored in the Relevant Document[cxs_relevant_doc] table. Match condition Conditions under which this search is enabled. For example, set [Active] [is] [true] to only enable the search on active knowledge articles. Enable search as Defines results to show for a different user. For more information, see Search as different users. Open the form context menu and select Save.The Search Fields, Filter Configurations, and Email Configurations related lists appear. By default, a search field record is added to search on the Short description field.
(Optional) To use a different search field, open the Short description record, select the field, and click Update.
(Optional) Complete the following steps to add a filter configuration.Filter configurations are defined to map fields from two different tables to provide a more targeted search result set.
You can also select Scripted filter in the Filter Configuration form and add a script instead of using a filter condition record.Click New in the Filter Configuration related list.
Select the Search resource: pinned, knowledge, or social.
Open the form context menu and select Save.
In the Filter Conditions related list that appears, click New.Based on the selected Search resource, the filter condition provides a query table to compare with the current form, for example, the Incident form. You select a field from each table, and the search results only include items where the values in the compared fields match.
Select the Field to compare and the Compare to fields for the Query table and Current form tables.
Select what value is compared, the value or the display value.
Select the Include if blank check box to include results if the Compare to field has no value.
Click Submit.
Click Update in the Filter Configuration form.
(Optional) Complete the following steps to define email configurations to include knowledge search results.
Click New in the Email Configurations related list.
Select the email notification to attach search results.You can select only from the notifications that are on the same table as the table configuration record.
Select the field used to restrict the search results.For example, if you select Opened by, the search results include only the articles that the opened-by user can access based on user criteria.
Update the Limit field as desired.
Click Submit.
Click Update to save and close the Table Configuration record.
Add the search results area to the form for the associated table.
Navigate to the relevant form for that table. For example, navigate to Incident > Open and open an Incident form.
Configure the form and add Contextual Search Results in the location where you want to display the results. For example, you can display the search results immediately after the text field the search is based on or at the bottom of the form.
Last Updated: June 15, 2017
Tags: Jakarta, Now Platform Capabilities, Contextual Search
转载于:https://blog.51cto.com/13716461/2341713