Thankyou Matt, but I am still lost.
I have created a few textboxes, a dropdownlist, a button and a repeating table. My intention is to add a new row to the repeating table extracting information from the dropdown and textboxes when the button is clicked.
I have previously extracted information from specific nodes without much difficulty. It is just this process of creating a new row in the table that I am stuck with.
You refered to a link which talks about referencing namespaces of a secondary datasource. But I am looking to move data from one node to another in the same xml without looking at another datasource. I do not understand why I cannot do this.
My book on all things Infopath is taking it's time to get here and I think this boils down to my fundamental lack of understanding on how Infopath hangs together.
Here is my code behind:
{
var row = XDocument.DOM.selectSingleNode("/my:myFields/my:SORDetails/my:RepeatingData") ;
row = row.cloneNode(true) ;
row.selectSingleNode("my:SORQTY").text = "QTY" ;
var parent = thisXDocument.DOM.selectSingleNode("/my:myFields") ;
parent.appendChild(row) ;
And from the extracted Template.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:new-design-1:-myXSD-2006-03-03T16-21-10" href="manifest.xsf" solutionVersion="1.0.0.9" productVersion="11.0.6565" PIVersion="1.0.0.0" ?>
<?mso-application progid="InfoPath.Document"?>
<my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-03-03T16:21:10" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
<my:SORDetails>
<my:RepeatingData>
<my:SORQTY></my:SORQTY>
</my:RepeatingData>
</my:SORDetails>
</my:myFields>
Any further help would be great!
Thanks