Add InfoPath image as attachment to SharePoint list item

Learn how you can use the Lists web service in SharePoint to add an image from a Picture control on an InfoPath form to a SharePoint list item without having to write code.

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.

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

The following InfoPath 2010 video tutorial shows you a quick way to take advantage of the AddAttachment operation of the Lists web service in SharePoint to add images as attachments to SharePoint list items.

Note however that this solution only works with Picture controls. If you want to use a File Attachment control to attach other types of documents to SharePoint list items, you will have to write code similar to the code in recipe 98 of InfoPath 2010 Cookbook 3 (for C#) or InfoPath 2010 Cookbook 4 (for VB).

In this InfoPath 2010 tutorial video, you learned...

  • How to add a data connection to the AddAttachment operation of the Lists web service of SharePoint.
  • How to add an Action rule with actions to set the parameters of a web service operation and then query the web service.
  • How to publish an InfoPath form template to a SharePoint form library.

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