Linking repeating tables + Completion percentage - InfoPath Dev
in

InfoPath Dev

Linking repeating tables + Completion percentage

Last post 12-03-2008 06:04 AM by Christoffel de Gruyter. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 12-01-2008 05:37 AM

    Linking repeating tables + Completion percentage

    Simple question really. I'm syncing Infopath with a bunch of xml export files, and although it's quite easy to default a given node to an imported XML's node. This data does not repeat itself in repeated tables.

    Is it possible to link my repeated tables to their respective xml paths?

    Second, is there any kind of formula or VB code that counts the number of filled nodes in main, divided with the total number of nodes?

  • 12-02-2008 02:23 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Linking repeating tables + Completion percentage

    Hello Welcome to the Forums,

    1. While importing the xml nodes if you do not want repeat the nodes means we have to write the small code to remove those nodes.

    IXMLDOMSelection nodes = (IXMLDOMSelection)thisXDcoument.DOM.selectNodes("XPath of repeating node");

    nodes.removeAll();

    2. If you want to copy the repeating fields to another dom, If the schema structure is same then we can replace with node list parent node to another parent node.

    3. If we want to get node list of the number of fields in main dom then we can easily get how many fields are there in that node using below code,

    int numberOfFields = nodeList.Count;

    Note: Above code in C#.

  • 12-02-2008 02:31 AM In reply to

    Re: Linking repeating tables + Completion percentage

    Ah, no, I wasn't really clear it seems.

    Just like when you can easely default one node from a data connection to one of your nodes in your main, I would also like to default folders, so they can recieve all data, instead of just the first fields. This isn't possible however, so I'm wondering how I could import multiple lines of data at the same time so it automatically fills out my repeating tables.

    Second, thanks for the code :).

  • 12-02-2008 05:29 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Linking repeating tables + Completion percentage

    Hello,

    We can get the default node values while importing the DOM.

    • 1. In your case repeating section node contains more than one then we have to replace with parent node in main DOM parent node. Sample of schema structure,

    Secondary DOM,

    <my:myFields>

              <my:FirstNodeName>

              <my:Groups> //Parent of repeating section (group)

                       <my:Group> //Repeating node name or group

                                 <my:FirstName />

                                 <my:SecondName />

                       </my:Group> //End of repeating node

              </my:Groups> //End of parent repeating section

    </my:myFields>

     

    If you want to export ‘<my:Group>' node details to main DOM then you have replace with main DOM -> <my:Groups> node with secondary DOM ‘<my:Groups>' node.

    • 2. If your main DOM and secondary DOM schema structure is different then you have to get every node value and copy to main DOM node using code.
  • 12-03-2008 06:04 AM In reply to

    Re: Linking repeating tables + Completion percentage

    I'm sorry, but I don't really understand. I can't use the secondary nodes because they're read-only.

    But, maybe my question wasn't clear enough. I can link specific nodes, but I can't link folders. Is there any way to link these folders?

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