How to get fields-value from Repeating Table - InfoPath Dev
in

InfoPath Dev

How to get fields-value from Repeating Table

Last post 08-09-2006 01:38 AM by hebsgaard. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-03-2006 08:11 AM

    • nobel
    • Not Ranked
    • Joined on 01-03-2006
    • Posts 3

    How to get fields-value from Repeating Table

    Hi,

    I'm the beginner in InfoPath and don't know know JavaScript much.
    I have a question about the repeating table in InfoPath.

    Now I'm finding the way to get fields-value from each row in the repeating table by looping. <to pass to webservice>
    But all I can do now is get the fields-value of the first row only.

    My Question is "How to get the fields-value of the second, third.... row."

    Plz help.
    Thank you ^^"
  • 01-03-2006 11:03 AM In reply to

    Re: How to get fields-value from Repeating Table

    Welcome...

    Pretty simple. In a for loop you can do something like:

    for (i=0;i<XDocument.DOM.selectNodes(...XPath...).length;i++) {
    XDocument.DOM.selectNodes(...XPath...)(index).text
    }
    Jason
    http://www.k2distillery.com/
  • 01-03-2006 09:18 PM In reply to

    • nobel
    • Not Ranked
    • Joined on 01-03-2006
    • Posts 3

    Re: How to get fields-value from Repeating Table

    Thank you vt_asparagus,

    It works and return all fields-value in each row.
    If I want only one fields-value from that result, what should I do.
  • 01-03-2006 10:02 PM In reply to

    Re: How to get fields-value from Repeating Table

    Here's how I do it (I think it's a little easier to understand):

    var group = XDocument.DOM.selectNodes( "/Xpath/to/items" );
    while( curNode = group.nextNode() )
    {
    var field1 = curNode.selectSingleNode( "field1" );
    var field2 = curNode.selectSingleNode( "field2" );
    var field3 = curNode.selectSingleNode( "field3" );

    XDocument.UI.Alert( "field1: " + field1.text + " field2: " + field2.text + " field3: " + field3.text );
    }


    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 08-09-2006 01:38 AM In reply to

    Re: How to get fields-value from Repeating Table

    That was exactly what I was looking for for another problem Matt. Thanks.
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.