Submit Rows of a Repeating Table as Individual Items within SP2010 Library - InfoPath Dev
in

InfoPath Dev

Submit Rows of a Repeating Table as Individual Items within SP2010 Library

Last post 04-22-2013 02:52 PM by ErnestoM. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-18-2013 08:25 AM

    Submit Rows of a Repeating Table as Individual Items within SP2010 Library

    Hi,

    I have an IP2010 Library Form with code behind it that uses a button to populate individual rows within a repeating table in SP2010.

    It basically does this: http://www.youtube.com/watch?v=tFqvKbKp9r0

    I have a secondary connection that is populating its own repeating table of Events (from a secondary sharepoint list) based on the ID that a SharePoint List Filter web part is sending to this secondary connection.  Once the first repeating table is populated with the events, I then have a button on each row of the repeating table that the user can push and will send it to another repeating table based on the main connection (SharePoint Form Library).  I can get all of my rows to properly populate the repeating table, but when i submit the form, it will only submit the first line of my repeating table as viewable within my Form Library (yes, i know you can do the merge function, but that doesn't solve the issue).

    I'm in need to have the repeating table submit each line it is populated with as an individual record within the SharePoint Form Library.  I have no issues when I submit repeating tables within a SharePoint List, but it doesn't seem to default the same within a SharePoint Library.

    Anyone know of a solution for this?  Thank you!

  • 04-19-2013 06:32 AM In reply to

    Re: Submit Rows of a Repeating Table as Individual Items within SP2010 Library

    I'm a little confused by your scenario...

    A SharePoint list stores flat data. A list item will have a set number of columns with data and you can load each of those items via a secondary data connection, into an InfoPath form. Once in the InfoPath form, you'll have a repeating structure in your secondary data source (containing all the list items). You can copy one or many into the main data source.

    That main data source is an XML file. It is not flat; that is, it can contain repeating data. Using a submit-type data connection, you can submit that XML file into a SharePoint form library. The ShP form library stores the XML file and promotes some properties into the columns. So while the data appears flat when you visit the form library, it is not flat; there's an underlying XML file for each form in the form library.

    In order to submit each line item into an individual record, then your form's schema is probably not going to be repeating. That is, you'll have a form that queries the ShP list, the user can select one list item from the secondary data soure, that data is copied into the main data source (which is not repeating) and then you submit that XML into the form library. Then you open a new form, select another list item, and submit again.

    Perhaps there's some way to have:

    * a repeating table in an InfoPath form

    * use the data from each row to generate an XML file

    * submit each of those XML files (iteratively) into the form library (to generate a unique item for that row).

    It would probably involve custom code and unfortunately I've never worked in such a scenario. It's confusing to me because in that scenario, you would basically end up with identical data (the data in the list is going to be identical to the data in the form library). There's no grouping or merging going on; it seems like a flat migration.

    Can you provide more info on your scenario? Maybe someone else will be able to help out with further advice.

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


  • 04-19-2013 02:32 PM In reply to

    Re: Submit Rows of a Repeating Table as Individual Items within SP2010 Library

    Thank you for your response and thoughts here as well, Ernesto!  Please excue any confusion I may have caused with my initial question.  It is a rather confusing and somewhat arduous process I'm having to develop for this. I currently have a list, let's call it List A, in which the user goes to schedule dates for certain milestones for their projects.  Since this is a SP list, the repeating table of events submits, as you said, flat, and goes into the line by line.  This obviously makes going in and rescheduling dates when the dates change quite difficult for the user since they would have to go in to each line and set their new dates.  As a solution for this we created another list and form (List B) where, using a SharePoint List Filter web part, the user can search for their project.  Once the project is selected from the filter, we have a repeating table (secondary connection) query List A and fill in all the previously submitted milestones from List A into that secondary repeating table.  Once we have all the milestones pulled up, the user then has to manually type in the name of their milestone, fill in the previously requested date, and then populate their new date.  It's all part of a process for them to gain approval to move forward with those new dates.

    What I'm trying to do is make that last step easier, where once the secondary repeating table has been populated, the user can then click the "Copy" button that is in each row of that secondary repeating table, and it will automatically populate the main connection repeating table with the selected information.  Seeing as this involves coding, I had to move to a Form Library Template as opposed to a List template.  I currently have the "Copy" button figured out, but now I'm running into the issue of the Library not being "flat."  I actually perfer to see all these new milestone date requests at a glance as opposed to having to drill into the XML file and that's why I'm wanting each row of my main connection repeating table to populate a new row within my library.  Hope that helps clear things up a bit.

  • 04-22-2013 02:52 PM In reply to

    Re: Submit Rows of a Repeating Table as Individual Items within SP2010 Library

    Hi-

    So if I've understood correctly, this is what I would propose:

    1. Query a shP list
    2. set the values in a secondary XML
    3. Submit that Secondary data source XML to a form library
    (repeat these steps iteratively for various list items)

    You can use the qRules command SubmitToSharePoint to submit a secondary XML, though you'll still have the challenge of iterarating thru the steps above.

    You could, of course, use custom code to submit instead of using the qRules command.

    Hope this helps!

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


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