I have a repeating table in Infopath. On a field change event, I need to execute a calculation to with data in the row in question. How do I go about this in the code-behind (C#) and Xpath?
For example, I have a start date and end date. In the code-behind the do a calculation to calculate the number of hours in the span. This works for the first row, but not subsequent rows. I know the way I wrote it so far only works for the first row, but how do I make this work for all rows?
You can use XPathNodeIterator for this. For example: You can use XPathNodeIterator for this. For example:
This will get the value of each field and set a string variable to that value. If you wish to concatenate all the values, you'll need to modify this -- you can do something very simple like: