
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on ‎03-16-2022 07:01 AM
The default behavior for attachments in AI Search is to provide them as separate search results. Additionally, the behavior is to download the attachment on click and provide a separate link for navigating to the parent record.
If you would like to remove attachments from search results, you can set the flag on the AI Search > Indexed Sources > (the name of your table) > Advanced Configuration (related list) > index_attachments. You can edit the attribute by clicking on the ‘i’.
The set the value to false.
If you would like to change the default click behavior, you will need to edit the EVAM configuration for attachments. This will change the behavior for all attachments in the system, regardless of source or portal.
First, navigate to the Attachment Search Template. Entity View Action Mapper > View Templates and search for attachment. We need to swap the clickAction and the footerLinkAction as shown here:
{
"component": "sn-search-result-evam-card",
"staticValues": {
"detailLabelType": {
"translatable": false,
"key": "inline"
},
"textHeaderLabelOne": {
"translatable": true,
"key": "Attachment"
},
"detailLabelOne": {
"translatable": true,
"key": "From:"
}
},
"mappings": {
"imageType": "doctype_image_type",
"icon": "doctype_image",
"imageURL":"doctype_image",
"textHeaderLabelTwo": "doctype",
"title": "ai_search_teaser_title",
"summary": "ai_search_teaser_text",
"detailValueOne":"parent_title",
"ariaLabel": "file_name"
},
"actionMappings": {
"clickAction": "navigation_to_parent_record",
"footerLinkAction": "navigation"
}
}
Next, we need to change the URL text for navigation, which will now act as a direct download of the attachment. We need to go to the specific navigation action for attachments, which will take a few steps.
First, navigate to the configuration associated with our template. That will be under Entity View Action Mapper > View Configurations > search for attachment. It will be listed as Attachment Search Results. Scroll to the bottom of the page to find the two actions associated with attachments.
Click on the ‘i’ next to navigation and open the record. On the next screen, click on the ‘i’ next to the Declarative Action and open that record.
Here, we can change the Action Label. I’ve changed mine to ‘Download’.
Once this has been saved our attachments will now default to opening the parent article and the download link is presented below, like this:
- 5,733 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This was really helpful - thank you for the information!
I am struggling to find the correct place to update the result configuration, to render the KB on kb_article_view on click; it keeps rendering on the form.
I had this issue in other places, and needed to create Result Action Configs. I have one for Knowledge to navigate to the parent record, but that does not seem to be working. Any ideas?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Mary Beth,
Thanks for the question! A common issue is that the correct portal is not defined in the Result Action config. Assuming you have something that looks like this:
You may need to update to include the applicable portal.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is a great post- thank you!
I've been looking for a way to disable the indexing of attachments for only one Search Application and that trickles down to the Search Source which points to an Indexed Source. The issue is that I am unable to create a second Indexed Source based on an existing table (Knowledge in this case- so one with KBs indexed and the other without) to be used only for our Portal. The documentation also states that only one indexed source can be created for a single Now Platform table, though plugins and applications can get around this.
Has anyone else found a similar solution?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello Gerad,
I have created new Indexed source on Task table for Incident and Requested items, when I indexed the tables all attachments were also returned in results so I have set the index_attachments attribute to false for RITM, Incidents and reindexed the table however now no results are returned including the Tickets.
Do you what would be the reason ?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Bharath38 ,
I would open a case with support. I don't believe this would/should restrict indexing for the entire table.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I processed these steps but the download action tries to open the form view for the attachment how to I have it download the attachment or attempt to open the attachment separate from the article?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very useful article, thanks for taking the time, I see that in Vancouver, AI Search keeps the attachments with the parent record which is a much better experience for all.
Here's how to configure it:

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Paul Curwen - yes! I have been excited about this coming for some time now. I hope this helps everyone.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Michael Hilton - a couple of things. Check the Search Results Actions table to make sure that you have the proper relationship in place. Additionally, you may need to swap the navigation actions in the EVAM template still.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Gerard Dwan - is there any way to exclude a specific attachment from AI search results? Generally, we want attachments indexed, searched, and shown with the parent knowledge article in AI search results.
But we do have knowledge articles with specific attachments that we would like excluded from AI search index and results. Is that possible? Thanks.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Gerard Dwan I have implemented this solution for our client requirement but the attachments are not visible under search results in portal for few of the articles which have "Attachment Link" checked.
Can you please let me know what else I need to verify for this to work?
Thanks,

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Brad_B - not an attachment. The same rules apply to the attachment as the knowledge article, though. So the only way to exclude attachments is to exclude the 'parent' knowledge article.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@nikitajos04 - I'm not sure what the issue would be there. I would look into a newer feature with AI Search attachments that allows them to be visually grouped with the parent record. Details here.