Merge Grouping - InfoPath Dev
in

InfoPath Dev

Merge Grouping

Last post 04-04-2006 06:53 PM by Shiraz Cupala. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-20-2006 07:33 AM

    • IcySea
    • Not Ranked
    • Joined on 03-20-2006
    • Posts 1

    Merge Grouping

    I am trying to merge forms together to create somewhat of a project summary.

    In the merged form, I want to group all the Projects with all the associated tasks.
    I expect the final form to appear somewhat like:
    <Project> *Repeating
    <Tasks></Tasks> *Repeating
    </Project>

    The closest example I could find was here:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_tr/html/odc_INF_Lab11.asp

    Using this example, I created sample form1 as:
    <Customer>Cust1
    <Name>123<Price>....

    Sample Form2:
    <Customer>Cust2
    <Name>456<Price>...

    Sample Form3:
    <Customer>Cust1
    <Name>abc<Price>...

    Upon merging:
    I get a section created for Cust1 as expected from Form1.
    I get a section created for Cust2 as expected from Form2.
    From Form3, I expected to have the Name, Price, etc. added to the section created by Form1, but it creates a blank section to which it appends the Form3 data.

    If I were to add a form4 for Cust2, the details would be appended to the blank section with the Cust1 data... and so on.

    So, it appears that the code, in the instructions, for adding the details to a defined section is incorrect (or I am missing some detail).
    Here is the section I refer to:
    for(var j = 0; j < oSrcItems.length; j++)
    {
    var oSrcItem = oSrcItems.nextNode().cloneNode(true);
    oTrgCustomer.selectSingleNode("my:itemsContainer").appendChild(oSrcItem);
    }

    Being a newbie, I have sadly been unable to fix this.

    Please show me the err of my ways.
  • 04-04-2006 06:53 PM In reply to

    Hello, welcome to our forum. I noticed that your post has a lot of views but no replies. Creating custom merge is a very complex area in InfoPath which is probably why no one has ventured to answer your question yet. Unfortunately, I'm in the same boat. It's not easy to do. Hopefully my response will pull this back to the top and get one of the code gurus out there to attempt a response.

    That said, one other place to see how custom merge works in is the sample out of box solution "Status Report". That does a simple custom merge using a custom merge XSL.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.