6

I have an announcements list and some announcements have multiple attachments. The view is set to show the attachments, but it just shows this paperclip icon which probably means the list item has attachments.

What I need to achieve, is to show the name of the attachments of the list items in an extra column (if possible, on a multiline text field). How would I achieve this?

I found this site that has an answer but it is for SP2010, I am working in SP2013 and I can't use this. :( Anything that can be done with SP Designer 2013 would be awesome.

  • why you said you can't use what the site you linked suggested? You can still manually edit the xslt code – MdMazzotti Jan 29 '14 at 14:26
  • I do not know how to manually edit the xslt code, I see something completely different than in the site I suggested. I don't see xsl elements. – Magali Jan 30 '14 at 11:05
  • because you have to click on "customize xslt". see here anklal7.blogspot.it/2013/05/… – MdMazzotti Jan 30 '14 at 11:23
  • But I can't! Even in advanced mode, wherever I click in the code of the list view, I never get the "List view tools" tab in my SPD2013 ribbon, all I get is the "Code view tools", "Web part tools" and "web part zone tools" tabs. The problem I have is like the one here: community.office365.com/en-us/forums/154/p/177765/523087.aspx – Magali Jan 30 '14 at 11:47
  • In the link you gave, there is a workaround for your issue. Tried it? – MdMazzotti Jan 30 '14 at 11:54
2

You have 2 ways to do it.

One is create a hidden field in the list named Attachments, and with the help of event receiver, set it when attachment added, updated, deleted. So, now you have the attachment names (if needed add them as links, for this the column must be of type multi line text box (rich text field)).

Second and easiest way is the modifications using SharePoint Designer. Just follow this steps mentioned at: http://amitphule.blogspot.in/2012/04/display-item-attachments-in-sharepoint.html

Let me know if you need any additional help.

  • 1
    Will the second way also work when a list item has more than one attachment? So if a list item has two attachments, will it be able to show the names of both attachments or will it only show the name of the first attachment? – Magali May 12 '14 at 13:06
  • with those event receiver you can download and upload to another document library and set value hyperlink for that docs in the custom field that you can develop that if you want @Magali – saber tabatabaee yazdi Dec 11 '16 at 4:56
0

I assume you have already found a solution for your issue. I was also struggling with the issue similar to yours. Could not get "List view tools" for my view. That was resolved after I checked "Server Render" option in Web Part properties-Miscellaneous section. However, I found an easy workaround by using jslink and jquery. Please refer to this source.

0

I got round this issue by using Infopath Designer to inject the URL into a "simple line of text" field.

The steps were as follows.

  1. create a "single line of text" field in your list. I called mine "AttachmentURL"

Add a single line of text field

  1. Load infopath designer. and load your SharePoint list

  2. Right click on the "single line of text" field "AttachmentURL" and select "Text box properties"

Select text box properties

  1. In the "Default Value" section next to "Value", click the "Fx" button

Fx

  1. In the "Formula" dialog box, select the "Insert Field or Group" button

Insert field or group

  1. In "Advanced view", expand the "Attachments" folder, and select the ":attachmentURL" icon and click "OK" all the way back to your form

Select field or group

  1. After making any other alterations in your form, publish the form to the SharePoint list

Publish

This gave me the attachment filename. I then used SharePoint Designer to build the rest of the URL :

  1. Open SharePoint Designer and go to your list workflow

  2. You will now be able to build the Attachment's URL by creating a hyperlink that follows this construction :

    https://site/Forms/Lists/LISTNAME/Attachments/ID/AttachmentURL

Create hyperlink in designer

I had no issue creating the attachment URL in a designer workflow with this method. You can then push the full URL to another field if you like, or email it with the workflow.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.