locked
Parent/Child relationship in InfoPath RRS feed

  • Question

  • I've done a considerable amount of searching on this but haven't found anything concrete.

    I have 2 InfoPath form libraries in SharePoint.  I need to create a maintenance form (Add and Change) that allows child detail records to be added from the parent form.  Basically the top part of the form should be the header library item and the bottom should allow for up to 4 detail/child records to be added. 
    Based on everything I've seen, I'm thinking this is not possible. 

    When adding a new header, the bottom should allow for adding detail when the header is added.
    When maintaining an existing header, the bottom half should display the detail/child items. 
    The user does not want to add a header record then close the form and have to add a child in another form.  It should all be on one form.

    Was considering using an form linked to the header library and adding a data connection to the detail/child library.  When an existing header is displayed, the detail needs to be retrieved and populated.  When a new header is added, a "Add New Child" button should bring up a item in the bottom half (only 4 fields on the detail are required) for entry.  When clicking "Save", both records should be stored.

    Any help is greatly appreciated.

    Monday, April 29, 2013 3:52 PM

Answers

  • Yes I have.  I put a repeating table that binds to the data fields.  Problem is there is no way to filter the data that populates the repeating control.  Data connections cannot be filtered and there is no query mechanism.  Tried creating a rule but rules can only specify to query data.  Not provide filter criteria. 


    I was considering creating a formatting rule on the data source to filter that way.  The issue will be, of course, that ALL data will be returned to the form and then a filter applied to the data.  Obviously this is extremely inefficient and not good design.  Was looking for the means to filter data during the query process.

    Thanks for the input.


    • Edited by jd_hancock Tuesday, April 30, 2013 3:16 PM
    • Marked as answer by Emir Liu Friday, May 3, 2013 10:12 AM
    Tuesday, April 30, 2013 3:11 PM

All replies

  • Not sure if I've understood your requirement. Have you seen Repeating Section and Repeating Table controls in InfoPath? If you place Repeating Table inside a repeating section, does it address your requirement? As you add another section (header), it comes up with another set of repeating table (details).
    Tuesday, April 30, 2013 9:18 AM
  • Yes I have.  I put a repeating table that binds to the data fields.  Problem is there is no way to filter the data that populates the repeating control.  Data connections cannot be filtered and there is no query mechanism.  Tried creating a rule but rules can only specify to query data.  Not provide filter criteria. 


    I was considering creating a formatting rule on the data source to filter that way.  The issue will be, of course, that ALL data will be returned to the form and then a filter applied to the data.  Obviously this is extremely inefficient and not good design.  Was looking for the means to filter data during the query process.

    Thanks for the input.


    • Edited by jd_hancock Tuesday, April 30, 2013 3:16 PM
    • Marked as answer by Emir Liu Friday, May 3, 2013 10:12 AM
    Tuesday, April 30, 2013 3:11 PM
  • Ever find a good way to do this?   Thanks

    Thursday, May 7, 2015 3:17 PM