Attach a SharePoint document to a list item via an InfoPath form (no code)
This InfoPath 2013 video is a demonstration of how you can select any file from a SharePoint document library and attach it to a SharePoint list item without having to write code.
The following InfoPath 2013 with SharePoint 2013 video demonstrates how you can use a codeless technique to select any kind of file from a SharePoint document library and attach it to a SharePoint list item.
Instructions to create the solution demonstrated in the video below are available in the InfoPath 2013 Cookbook 2 Club.
InfoPath 2013 with SharePoint 2013 demo video transcript
Here I'm in SharePoint 2013, where I've got this SharePoint document library that contains these files and documents. The basic idea is that I would like to select any one of these files and attach it to a SharePoint list item.
I've already customized the SharePoint list form for this SharePoint list, which as you can see contains these 3 list items. Note that this solution only works for existing SharePoint list items, so you cannot use it to attach files to new SharePoint list items.
I'll select one of these items. Let's take the second one. As you can see it does not have any files attached to it. I'll click Edit Item. When the SharePoint list form opens, you'll see that we've got this drop-down list box control on it containing the names of the files and documents from the SharePoint document library. So I can go ahead now and select any one of these files and click Add Document to attach the file to the SharePoint list item.
The normal way to attach a file would be to click this file attachment control and then click Browse to select a file locally on disk and upload and then attach it to the SharePoint list item. But now we can easily select one of the files from the SharePoint document library and click Add Document to attach that document to the SharePoint list item.
So I'll save the item back to the SharePoint list. And then when I reopen it, we should see the files I attached earlier. And I can click any one of these to open them. So this is the InfoPath icon. And this is a Word document. So this is our Release Notes document in Word.
See more InfoPath 2013 tutorial videos »
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.