Hello. Sorry (again) if the information for my question is already posted but I am new to Infopath (2007) and the examples I have found in the threads do not solve my issue...
I have a repeating table with a button to insert a new row. Upon clicking the button, the current row is copied into the new row. However, I would like to overwrite a cell value. For example, on the current row is a value "Control 1" in the "Controls" field, when the button is clicked, i would like the "Control" value in the new row to be "Control 2". Below is the code i have:
XPathNavigator Group = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:NewAssessments/my:NewAssessment", NamespaceManager);XPathNavigator newRow = Group.Clone();
newRow.InsertAfter(Group);
//the above works
newRow.SelectSingleNode(
"my:Controls").Value = ("Control 2"); //this does not work
Ideally i would like to end up with the control number being the current row + 1.
I hope that makes sense, and any help is appreciated.
Many Thanks, Matt.