- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Have you turned on and configured AI Search but found that some record types aren't displaying useful information in their results? This was the case in our organization. Our SPM results, mainly Demands and Projects, were only displaying the Number field, and it wasn't user-friendly at all.
I searched through the documentation on how to configure these results, and I didn't find it straightforward at all, so I wanted to share the steps I took to help others avoid the headache in the future.
1. Create a new View Template on the sys_ux_composite_data_template table.
My best advice on doing this is to copy a record type that's configured similar to what you're looking for and modify it.
These are the areas you may want to modify:
- Icon: This determines which image/icon shows next to the result. Here is the list of available icons:
- Text Header Label: This determines the text that displays at the top of each result next to its Number.
- Detail Labels: These determine which additional fields are displayed below the record Name.
- Mappings: These contain the internal names of the header and detail labels above.
- Action Mappings: You'll want to leave this as "navigation" so clicking the result takes you to the record.
This is the result returned from the above view template:
2. Create a new EVAM View Config on the sys_ux_composite_data_template_predicate table using the new template.
Again, it helps to copy an existing template. The main items you'll need to update here are the View Template, Table, and Table Fields.
- Select the new View Template you created in the last step.
- Select all the fields you included in your view template in the Table Fields, otherwise they won't display in the results.
- Ensure the config is pointing at the correct Table.
- I left the same Custom Fields that were in the template I copied.
3. Add the EVAM View Config Action Assignment (sys_ux_predicate_m2m_action_assignment) for Navigation to the related list.
At the bottom of the above screenshot, you see the related list for EVAM View Config Assignments. You'll need to click Link Existing and add the action for "navigation", otherwise clicking your result won't take you to the record.
4. Go into the AI Search Indexed Source on the ais_datasource table and update the field attributes.
The field attributes on the AI Search indexed source determine what displays in various places within the results. In my case, I wanted the Short Description just below the number, and the Description on the bottom, below the detail labels I selected in the template.
In order to achieve this, I updated the Field Settings & Mapping via the related list, mapping Short Description to the Title and Description to the Text. I didn't touch the sort_by_date.
According to ServiceNow's documentation, you can only define one map_to field setting for an indexed source field. If you try to define multiple map_to settings for the same field, the system displays an error message.
5. Re-index your indexed source to see your changes.
If you changed the field settings and mapping on your indexed source, the change doesn't take effect until you re-index the content. You can easily do that by clicking the Index All Tables button.
For me, it took just a few minutes to complete. Once that's done, your changes should be visible in your global search results!
____________________________
Did you enjoy this content? Please mark it helpful, and follow me on LinkedIn for more tips and tricks!
- 2,304 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.