Issue: Using repeating tables in InfoPath is a great approach to capturing repetitive data on a form. However when you want to display the information contained in the form on a SharePoint list or web page, a few caveats come into play.

Let’s say you want to display information contained in the repeating table on a web page. When you design the InfoPath form you only have the options to display each field as either the first, last, count or merge (see image below).

image

This is not an issue if you are content to simply display the merged contents of the repeating table. But let’s say that you want to use the web page for something more than just displaying static data. For example; you might want to edit the page in SharePoint Designer and insert some conditional formatting. Having data merged into one cell/line might not work for your display requirements. In this instance you will need a unique line for each item in the table displayed on the list.

So how do you submit the rows of a repeating table in InfoPath to a SharePoint list? There is no easy method of doing this (specifically crafted my MS). I have found a few alternatives but most require code and are not for the beginner.

The Visual Basic code and the UpdateListItems method is one of the best methods I’ve come across so far. I have followed these instructions and got this to work. However a lack of time and knowledge of VB prevented me from getting more than basic fields to work.

For my requirements I tried another approach. This might seem long winded but it worked for me. I created a SQL database with all the fields I needed in the InfoPath form. I then designed the InfoPath form from the SQL database and published it to a SharePoint site. This form had 2 data connections – 1 to the SQL database and 1 to the SharePoint library.

Users go to the SharePoint library to open, complete and submit the form. The form (for record purposes) is saved in the library. A copy of the data is also submitted to the SQL database. Each item/line in the repeating table is stored as a unique line in the database.

On a new web page on the SharePoint site I inserted a dataview web part and connected it to the SQL db. I then ordered the fields as appropriate and applied some conditional formatting so that the page could be used as an overview or management page.

The immediate downside of this approach is you cannot edit the information in the SQL db directly by opening up the form again and re-submitting the data. I have not found out how to do this yet!

To be able to edit the data, open the web page with the dataview web part on it in SharePoint Designer and go into the web part properties section. Make sure to tick both the ‘show edit items links’ and ‘synchronize commands’ boxes (see below).

image

This will provide an ‘edit’ link on the dataview web part (see below). You can then edit the information in the list and have the changes synched in the SQL db.

 image

Hope this info helps…