Traversing all data fields - InfoPath Dev
in

InfoPath Dev

Traversing all data fields

Last post 01-17-2006 12:33 AM by Agni Jonnalagadda. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-16-2006 04:21 PM

    • qwer
    • Top 500 Contributor
    • Joined on 10-03-2005
    • Posts 49

    Traversing all data fields

    Hi all,

    Can anyone tell if it is possible to write scripts to traverse all of the data field names (not the DOM tree) that I have created in InfoPath Designer?
  • 01-16-2006 05:24 PM In reply to

    Re: Traversing all data fields

    I'm not sure how you're wanting to transverse the nodes, but you might be able to use the wildcard selector to accomplish this with XPath. Check this out:

    child::* Selects all children of the current node

    http://www.w3schools.com/xpath/xpath_axes.asp

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 01-16-2006 07:15 PM In reply to

    • qwer
    • Top 500 Contributor
    • Joined on 10-03-2005
    • Posts 49

    Re: Traversing all data fields

    Thanks MFaus,

    I probably should of explained it clearer. What I am trying to do is suppose I've created the following data fields

    myFields
    Group1
    G1Field1
    G1Field2
    Group2
    G2Field1
    G2Field2

    How do I use code to run through this structure and extract the field name (ie, G1Field1, G1Field2) one by one. I do not want the data store in the fields, I just want to find out their name.
  • 01-17-2006 12:33 AM In reply to

    Re: Traversing all data fields

    When you get the Node into an IXMLDOMNode then you have a property called "nodeName" which gives the name of the node.
    I think this is what you want!

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