Save Infopath repeating table in a Sharepoint list


Badge +1

I would like to know if there is any way of saving a repeating table in InfoPath to a Sharepoint List? Each line in the repeating table needs to be a List Item.


Thanks for help.


14 replies

Badge +9

There is not a way to do it without dropping into code within InfoPath, which introduces some deployment complexities so I don't recommend it.  Alternatively, you can do it within your workflow itself after an InfoPath form is submitted.  Would that be an option?

Badge +3

another way is to submit the repeating section to a webservice.  The webservice takes repeating section as an xmldocument loops throught it and creates the sharepoint list items.


We have done this way.

Badge +1

Hi, tbyrne,


I have a similar requirement, while building a timesheet that has line items, and would like to save each item to a Sharepoint list.  Can you provide a little more information on how to do this from within the workflow in K2, please?


Thanks!


Thiago

Badge +5

You can do this without writing code.  Map a SmartObject to the list and integrate its Create method into the form.  Add a column called 'Trigger' or some other generic term that you won't add to the InfoPath form (it won't be displayed but will be part of the repeating section in the data model) and give it a default value of 0 (zero).  On your Form Submit rules, button rules, or whatever control you want to create the list items, create a rule that sets the value of the 'Trigger' column to 1.  Then, right click the 'Trigger' field in the data model, and put a rule on it with a condition that says its value must equal 1.  Within that rule, map the repeating section's fields to the input properties of the Create method and then execute the Create method.  Basically what is happening here is that if you put a rule on a field in a repeating section, any rules on the fields within that section will get repeated for every repeating row.  So, one by one the row that sets the Trigger field to 1 will then get executed for each row in your table and will create your list item.  Also, after the rule that creates all of the list items is complete, add another rule that sets the Trigger field back to 0 in case you need to add more rows (this may not be necessary).

Badge +2

I must ask why you are pulling the data out?  Is this a reporting issue?  Just curious, because there may be a better approach based on your end goal.

Badge +1

I don't wish to use the timesheet form after it has been submitted.  The goal is to store the line items to a SharePoint list so it can be viewed by users and grouped with different list views.  The InfoPath form that I used to collect the timesheet data is only for input...


If there's a better approach, please let me know.


Thanks!


--Thiago

Badge

Can you please share this solution step by step with pictures as i am a new user to sharepoint and infopath.


would be very thankful for this


 

Badge +2

So, do users or managers make any changes to the list items after they are created?  If not, then your are just sending these items to a list for reporting.  I would suggest that you do not want to create this extra data just for reporting, and that you might want to explore different ways to report the time sheet details via SSRS or some other method.


 


For reporting IP data we save the form to a SQL XML table (via a web service) and use SQL XQuery to shred the details for reporting.  Quite powerful.  Once the data is available in SQL, SSRS can present w/in SharePoint as needed.


There are vendors such as QDabra (sp?) that have similar solutions for sale.

Badge

Can you please help clarify these steps as I would love to implement this solution, but am having trouble understanding each step.

Badge +5

Has anyone resolved this? It was suggested that a Smartobject method be used but I have no details.

Badge

Super Easy: http://sharepointsource123.blogspot.com/2012/03/how-do-i-use-infopath-2010-repeating.html?m=1 This capability has been around since InfoPath 2010 and most importantly no code

Badge

http://sharepointsource123.blogspot.com/2012/03/how-do-i-use-infopath-2010-repeating.html?m=1

Badge

you can try http://www.bizsupportonline.net/infopath2007/how-to-submit-items-rows-repeating-table-infopath-sharepoint-list.htm

Badge

Hi Erice,


I am exploring the interaction between K2 / Infopath and SQL (We are unable to move to K2 Smart Forms....).


Would your solution outline above allow all CRUD operations on the repeating items?


I am hoping to configure a Smart Object with the appropriate methodsand then use your trigger solution on the rows to fire these off  - perhaps on form submit.


I am interested in using InfoPath as part of a K2 process and having updates, and data stored in a SQL DB for a number of reasons.


thanks in advance.


Faheem


ps. We want to avoid sifting through the XML in SQL if possible, although we do have access to Qdabra's InfoPath tools - we cant integrate with the K2 process.

Reply