InfoPath Repeating Table with Many Columns Export to SharePoint List - InfoPath Dev
in

InfoPath Dev

InfoPath Repeating Table with Many Columns Export to SharePoint List

Last post 08-25-2014 06:00 AM by Steve Goodger. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-30-2013 02:47 PM

    InfoPath Repeating Table with Many Columns Export to SharePoint List

    Hello. I am new to SharePoint and new here so please be easy on my lack of knowledge. Also, apologies if this is not in the appropriate location on the forums.

    I am trying to create a browser-enabled purchase order form in InfoPath. Part of the InfoPath form is a repeated table with several columns: Part Number, Quantity, Description, Unit Price. Each row of the repeating table has these four columns for users to input the values to represent what they want to order. In the end, the repeating table can have many rows and each row would have these four columns. I have the repeating table set up great in my form, however, I am confused as to how to get this information into a SharePoint list. I am hoping that each row in the repeated table would be an item in the SharePoint list, and the columns in the repeated table would be the columns in the SharePoint list.

    I have searched the internet for most of the day trying to figure out how to do this. All of the examples that I have tried seem to focus on a repeating table with one column of data or individual rows entered one at a time. I have tried the instructions found here: http://blogs.msdn.com/b/infopath/archive/2007/03/26/submitting-to-a-sharepoint-list.aspx. It works as described but its not exactly the format of a repeating table that I am working with. I've found others on the internet as well, but they don't match the 4-column repeated table that I am looking for.

    Can anyone please direct me to helpful resources, or what I should modify to copy all of the columns in a completed repeating table to a SharePoint list?

    I am using InfoPath 2010 with SharePoint 2010.
  • 01-31-2013 05:16 AM In reply to

    Re: InfoPath Repeating Table with Many Columns Export to SharePoint List

    Hi and welcome to the world of InfoPath.

    We're discussing this same topic in another forum thread, so I'll direct you there. If the question/scenario is not the same, let us know.

    http://www.infopathdev.com/forums/t/24976.aspx

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 01-31-2013 05:33 AM In reply to

    Re: InfoPath Repeating Table with Many Columns Export to SharePoint List

    Thank you very much Ernesto. I will check out that other forum thread. I don't want to hijack it from the original question but I will watch it as it progresses and contribute if needed.
  • 02-01-2013 09:57 AM In reply to

    Re: InfoPath Repeating Table with Many Columns Export to SharePoint List

    I have read through the message thread that was provided for me. The situation is similar and I like how the question is about involving a codeless version. The method I used works but it uses C# code to perform the copy from the repeating table to the sharepoint list -- which I am now debating with our Network Administrator as to how I can use code on a web-based form. A codeless situation would be great but at least I have something working right now. I will continue to monitor the message thread for more updates and/or solutions. Thank you again.
  • 02-04-2013 04:48 AM In reply to

    Re: InfoPath Repeating Table with Many Columns Export to SharePoint List

    Glad that's working for you. I think that the scenario, sadly, does require code to work best. Whether that's done with custom code or with qRules, that's another debate, but please let us know what your Network Admin says about allowing code. It shouldn't be a big deal, but I understand that some administrators are hesitant to allow code.
    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 08-25-2014 06:00 AM In reply to

    Re: InfoPath Repeating Table with Many Columns Export to SharePoint List

    If you only want the data for presentation or approvals (sent in emails, etc) then there is a codeless way to do it. (or at the least, you need to understand basic HTML)

    In my case, I needed to create a SharePoint form library for requisitions, and kick off an approval workflow to get it authorized.

    What I've done in InfoPath is create a column at the end of my repeating table that concatenates that row of values in a table row string. 
    For example, with 2 InfoPath columns "item" and "price" - my last column "datamerge" would be a function to create an HTML row:

    =concat("<tr><td>",item,"</td><td>",price,"</td></tr>")

    Then I promote the column "datamerge" (selecting the merge option) to get it in SharePoint.

    In my case, I need to email that data to a list of approvers (e.g. a simple requisition form). 
    So to get this repeating table data I declare a Workflow string variable that includes the start and end of the HTML table, and inserts the "datamerge" column in the middle:

    POTable = "<table><tr><td>DESCRIPTION</td><td>COST</td></tr>[datamerge]</table>"

    Now when I include POTable in the body of the email I send for approvals in the workflow, it includes a table format of data along with
    all the other InfoPath form variables that are not part of the repeating table. 

    Works well enough for this purpose, and with additional HTML formatting and such in the HTML strings, it can be polished nicely for emails. 
    If PO editing is required, they use an EDIT view of the InfoPath form, and be sure to hide this data from the list view in SharePoint.

    I've only started using InfoPath/SharePoint 2013 myself, so I might be missing some fundamental means of doing it differently - but desperation is the root of creativity in my case.

    Cheers

    Steve

     

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.