Challenge: I’ve read and search through this site and found various methods described in part and I have not been able to implement any successfully. E.g.:
· newRow As XPathNavigator = sectionNode.Clone()
· writer As XmlWriter = sectionNode.AppendChild()
· Me.CurrentView.ExecuteAction("xCollection::insert", "RepeatTest_1")
Task:
· Programmatically (VB) add rows to a repeating section and
· Define two values:
o A Foreign Key that allows limitation of a view to a specific set of question responses / questionnaire form instance. This requires filtering or another method on the form.
o A question Foreign Key that allows definition of which text and controls to display for that element / detail row
Goal: Use a generic Questionnaire row design with its set of controls which should hide, show, etc. based on the type of form instance they are representing along with its individual questions.
· The bank of ‘forms’/question sets, questions, types, and answers are normalized into secondary record sources.
· Before populating the row, there are no rows visible to copy.
Environment: InfoPath Forms Designer 2007 (using VB) against an Access DB on a file server. Users are field staff. (No SharePoint)
What best method and insight might someone share if to get me on track? Sample code anyone? I've been working with InfoPath just 3 months and could use a little direction here. Thanks in advance.