Read the elements of repeating table - InfoPath Dev
in

InfoPath Dev

Read the elements of repeating table

Last post 08-03-2010 06:22 AM by alexia_net. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-02-2010 03:15 AM

    Read the elements of repeating table

    Hi. I want to create function which will add information to any repeating table no mater how many columns it has, but in order to do this I need to know if there is a way to read the element of a repeating table using code. By elements I mean the fields. How can this be done. Thank you!

  • 08-02-2010 05:43 AM In reply to

    Re: Read the elements of repeating table

    This is the way to loop through a repeating table (C#) and to read the values of the fields.

    XPathNavigator root = MainDataSource.CreateNavigator();
    XPathNodeIterator RepTable = root.Select("/my:myFields/my:NonConformes/my:RepeatingTable", NamespaceManager);

    while (RepTable.MoveNext())
    {
       string Insp = RepTable.Current.SelectSingleNode("my:Field", NamespaceManager).Value;

       //Do something with the fields
    }

     

  • 08-03-2010 12:01 AM In reply to

    Re: Read the elements of repeating table

     Thank you so much!

  • 08-03-2010 01:23 AM In reply to

    Re: Read the elements of repeating table

     Hi. I think I did not explained exactly what I intended to do. I want to read the names of the fields from one repeating table not the values. Using the names, I will add values into them. So if a repeating table would be like: Group 1 -> Group 2 ->Field1, Field 2, ..., Field n I want to read the names Field1, ..., Field n into an array and use them later. Thank you!

  • 08-03-2010 05:57 AM In reply to

    Re: Read the elements of repeating table

    humm... I have no idea how to do this i'm afraid...   Maybe someone else could help on this?

  • 08-03-2010 06:22 AM In reply to

    Re: Read the elements of repeating table

     Thank you anyway for trying mgarant.

     

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