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 »
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:
- InfoPath form to upload an image to SharePoint (no code)
- Top 10 questions about InfoPath attachments
- Use an InfoPath form and SharePoint Designer workflow to send an email with attachments
- Attach an InfoPath form to a SharePoint list item (no code)
- Attach a SharePoint document to a list item via an InfoPath form (no code)