Show Attachments of Search Record on ServicePortal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2018 05:39 AM
Hello Community.
I activated the attachment index on a table and created a search source for the same table so I could search for it on the service portal.
The search is working as expected, but I want the attachment to show on the result page just like it shows on the knowledge base. Below are some pictures to better illustrate my requirement:
I want this kind of result:
On this page:
Any help or recommendations?
Thanks in advance.
- Labels:
-
Knowledge Management
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2019 11:17 AM
Hello,
Go to Widget search page(to the page where results get displayed)- add SpAttachmentManager angular provider and add the following code to the template of search source for KB.
<sp-attachment-manager table="'kb_knowledge'" sys-id="item.sys_id" omit-edit="true"></sp-attachment-manager>
Mark as correct if it solves the issue.
Regards,
Yoshita.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2019 01:15 AM
Hello Yoshita.
This suggestion of yours is already implemented, the only issue is that it only brings the attachment itself, not the summary like it does on the knowledge base.
Thanks for your reply.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2019 01:43 AM
In this macro, kb_attachment_list_entry, check if the following line exists to display the terms, which actually contains the summary
<j:if test="${!empty(jvar_attachmentObj.terms)}">
<div style="margin-left: 3em;"><g:no_escape>${jvar_attachmentObj.terms}</g:no_escape></div>
</j:if>
Mark this correct if this helps.