I have an InfoPath template with a repeating section containing three controls. Once an xml file is created using this template, I would like to load the data from this repeating group of controls into a new template. The new template repeats the same three controls but contains additional controls (2 rich text boxes, 1 check box, and 1 date picker). I can load the data from the xml file just fine however the check box and date picker are loading as "cannot be blank" even though they are not defined that way in the template. I am not having this problem with the two rich text boxes.
This is the code I am using to load the data:
nodeSecondaryData = rootSecondaryData.Select("/ns4:MainDataSource/ns4:Matrix/ns4:OptionalFeatures/ns4:Requirement", NamespaceManager)
Do While nodeSecondaryData.MoveNext
Using writerMainData As XmlWriter = MainDataSource.CreateNavigator().SelectSingleNode("/my:MainDataSource/my:SystemQualificationTesting/my:OptionalFeatures", NamespaceManager).AppendChild()
With writerMainData
.WriteStartElement("RequirementTested", myNamespace)
.WriteElementString("Title", myNamespace, CheckString(nodeSecondaryData.Current.SelectSingleNode("ns4:Title", NamespaceManager)))
.WriteElementString("Description", myNamespace, CheckString(nodeSecondaryData.Current.SelectSingleNode("ns4:Description", NamespaceManager)))
.WriteElementString("Measurement", myNamespace, CheckString(nodeSecondaryData.Current.SelectSingleNode("ns4:Measurement", NamespaceManager)))
.WriteElementString("TestDescription", myNamespace, Nothing)
.WriteElementString("RequirementFulfilled", myNamespace, Nothing)
.WriteElementString("DemonstratedOn", myNamespace, Nothing)
.WriteElementString("Responsible", myNamespace, Nothing)
.WriteEndElement()
.Close()
End With
End Using
Loop
How can I stop this behavior?
Thanks