Sharepoint - How to submit data from repeatable table in infopath form to a sharepoint list?
Concerning the answer with reference to
- S.Y.M. Wong-A-Ton How to submit the rows of a repeating table in InfoPath to a SharePoint list
I managed to succeed in running the code from that article in Infopath 2010 (Sharepoint Online/Office 365) only after I changed CAML template XML file content from given in article:
<?xml version="1.0" encoding="UTF-8" ?>
<Batch>
<Method ID="1" Cmd="New">
<Field Name="Title" />
</Method>
<Method ID="2" Cmd="New">
<Field Name="Title" />
</Method>
</Batch>
to
<?xml version="1.0" encoding="UTF-8" ?>
<Batch OnError="Continue">
<Method ID="1" Cmd="New">
<Field Name="Title" />
</Method>
</Batch>
Until this change, I was getting
- {"InfoPath cannot submit the form.\nAn error occurred while the form was being submitted.\n\nThe SOAP response indicates that an error occurred on the server:\n\nException of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.\rhttp://schemas.microsoft.com/sharepoint/soap/\">Value does not fall within the expected range.\n"}
Also that article fails to mention to create repeating table from secondary data source (2007) or secondary data connection (2010)
This particular article exemplifies how to submit multiple items to a list.
Generally speaking, any submit to a web service data connection uses CAML XML template and filling repeating table...
Following
- Matt Faus Add SharePoint List Items with InfoPath (CAML)
with some obvious modifications, it is possible to submit to more than one list from one Infopath form.
Here is a way to do it directly in InfoPath, http://blogs.msdn.com/b/infopath/archive/2006/04/05/569338.aspx. It's called the double eval trick and can be used to turn repeating form data into a single column value that can be pushed to a Sharepoint list (multiple line of text column).
You could push this to a Holding list where you could then use an event receiver to take that multiple line of text data, parse it out and update items in the desired list.
http://www.bizsupportonline.net/infopath2007/how-to-submit-items-rows-repeating-table-infopath-sharepoint-list.htm
There is a step by step process to do it above.
The solution is described as:
Programmatically add rows of data from a Repeating Table to a SharePoint list by submitting a CAML update batch to the UpdateListItems method of the Lists web service that comes with Windows SharePoint Services (WSS).
requirements: Sharepoint Designer, Infopath