Is there a way to programatically insert another instance of a repeating section, (depending on another event or user selection) ? The repeating section is tied to a SQL table called Formdata through the Main data connection .. .
I assume its a form of Xdocument, but can not figure this out. and I can find no reference online.
A code snip would be great... (When we add the sections manually, we reference the data by using a reference to Formdata_1[whatever instance]
Like this : (for assigning a value) (using Jscript)
to assign a value to the 2nd instance of the repeating section
var fname="Formb";
XDocument.DOM.selectSingleNode( "/dfs:myFields/dfs:dataFields/d:tbl_FormData_1[2]/@Form_Name").value=fname;
I have been searching for an answer to this for quit a while. Thanks in advance.
We are using Infopath 2003.