for(var i = 0; i < XDocument.DOM.selectNodes("my:myFields/my:group1/my:group2").length; i++)
{
XDocument.UI.Alert(XDocument.DOM.selectSingleNode("my:myFields/my:group1/my:group2[i]/my:pickupReady").text);
}
I can't seem to get this to work. group2 is a repeating table with a cell containing a checkbox, pickupReady. I want to cycle through the rows and evaluate whether or not the checkbox is clear. the following works:
XDocument.UI.Alert(XDocument.DOM.selectSingleNode("my:myFields/my:group1/my:group2[1]/my:pickupReady").text);
I can enter any number as long as there is a corresponding row but i don;t want to manually enter the row number, i want it done programmatically using the variable "i".
When I use the variable "i" as I did at the very top infopath errors out and says an object is required. Why can't I use the variable? I have also tried the following:
XDocument.UI.Alert(XDocument.DOM.selectSingleNode("my:myFields/my:group1/my:group2["+ i +"]/my:pickupReady").text);
again it isn;t working... anyone have a suggestion?