Attach an InfoPath form to a SharePoint list item (no code)
This InfoPath 2013 video is a demonstration of how you can attach the XML file for an InfoPath form 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 submit an existing InfoPath form to a SharePoint form library and attach it to an existing SharePoint list item.
Instructions to create the solution demonstrated in the video below (excluding the extra solution to open the InfoPath form attachment in the browser, which you can derive from recipes 57 and 68 of InfoPath 2013 Cookbook 3) are available in the InfoPath 2013 Cookbook 2 Club.
InfoPath 2013 with SharePoint 2013 demo video transcript
In a previous video I already showed you how you can attach a file from a SharePoint document library to an existing SharePoint list item. You can apply that same technique to attach the XML file for an InfoPath form to a SharePoint list item.
Here I'm in SharePoint 2013, where I've got this SharePoint list that contains these 3 list items. I'll be attaching an InfoPath form to this third item, which as you can see currently has one file already attached to it.
I've already published an InfoPath form template to this SharePoint form library, and added an InfoPath form. So I'll just open this InfoPath form. As you can see, its name is Form_15. And I'll select the third item from the SharePoint list, and then submit the form.
Once the form has been submitted, I'll go check on the SharePoint list item. So I'll open the third item. And as you can see, we've got Form_15.xml here as an attachment to the SharePoint list item. Now I can click on this attachment and the file will then be downloaded. I can open it, and then InfoPath Filler will open up, and display the InfoPath form. So here we've got Form 15 that is attached to the third item.
If you want the InfoPath form to open in the browser, you can combine the techniques of recipe 57 and 68 of InfoPath 2013 Cookbook 2 to create a solution where the user must first retrieve the attachments of the SharePoint list item, and then the user can select one of these attachments. If I select the Fruits Excel file, you'll see that no hyperlink will appear. If I select the XML file, you'll see this hyperlink appear. And I can click on this link then to open the InfoPath form in the browser. So here we've got Form 15 that is attached to the third item.
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.
Related InfoPath Articles:
- Attach any file to a SharePoint list item using InfoPath
- How to submit an InfoPath form to a SharePoint list and attach the form to the list item
- How to upload a file to SharePoint from an InfoPath form
- Upload or download images in SharePoint via InfoPath
- Select and add files from a document library as attachments to a form