Getting structure of a repeating table - InfoPath Dev
in

InfoPath Dev

Getting structure of a repeating table

Last post 07-21-2010 01:44 PM by blackhawk. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-16-2010 06:45 PM

    Getting structure of a repeating table

    Is there a way to get the structure of a repeating group element programmatically in IP2003?

    Here is what I am trying to do:

    I have a secondary (or sometimes a primary) data source driven by a web service.   There are times when the web service returns no data due to the input parameters, however I need to be able to add a node and it's children to it, but because there is no data to use as a template, I cannot programmatically add one using the data source.  Is there a way to get to the schema and look up the information to create a new node (and it's children)? 

    I am using the 2003 OM.

    Example:

    Sample of what InfoPath sees:

    <MyData>
    ....<Row> (repeating)
    ........<Col1 />
    ........<Col2 />
    ........<Col3 />
    ....</Row>
    </MyData>

    I don't know in advance what this structure is, so I cannot assume anything about the data source.   I would like to read the XSD document in some way to extract the information and then add a new Row element and the subsequent column elements.

    Is this possible?

     

     

  • 07-16-2010 10:07 PM In reply to

    Re: Getting structure of a repeating table

    You can load up the template's sampledata XML file with the following code.  That should contain everything you need to figure out the structure you're looking for:

    IXMLDOMDocument doc = thisXDocument.CreateDOM();
    doc.load(
    "sampledata.xml");

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-21-2010 01:44 PM In reply to

    Re: Getting structure of a repeating table

    Sorry for the long delay in responding...but that worked most excellently.   I didn't even think about that until you brough it up.   Kind of one of those DOH! moments.

     

    Thank you!!

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