Attach any file to a SharePoint list item using InfoPath

This InfoPath 2010 video is a demonstration of using a file attachment control on an InfoPath form to upload and attach any type of file to a SharePoint list item.

The Lists web service allows you to manage SharePoint lists and list items. You can add a data connection to it from within InfoPath and then invoke its operations to work with list items in SharePoint without writing code.

And you can use the AddAttachment operation of the Lists web services to upload and attach files to a particular SharePoint list item.

In a previous InfoPath video tutorial, I showed you how you can create a codeless InfoPath form with a Picture control on it to upload and attach images to a SharePoint list item without having to write code.

In that video I also mentioned that if you wanted to use a File Attachment control instead of a Picture control, you would have to write code similar to that in recipe 98 of InfoPath 2010 Cookbook 3 or InfoPath 2010 Cookbook 4.

The following InfoPath 2010 demo video shows you how the solution would work if you used a File Attachment control and wrote code for the InfoPath form. Note that the code that is written does not require Full Trust to run, so the InfoPath form template does not need to be published by an administrator, but can be published directly to a SharePoint Form Library as a sandboxed solution.

See more InfoPath 2010 tutorial videos »

 


Related InfoPath Articles:

 

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. 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.

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners

InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013

InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010

InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers

InfoPath 2010 Cookbook 4: 101 Code Recipes for VB Developers

InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services