Hi all,
I've read numerous posts on here about this topic, but I'm stumped.
I have two separate InfoPath web forms (segregated for privacy concerns); let's call them "Form Template 1" and "Form Template 2".
Form Template 1 houses a repeating table with field "Name". Each new form, created off of Form Template 1, is saved with a unique ID and uploaded to a SharePoint Library.
My issues arise when I attempt to reference Form Template 1's SharePoint Library as a secondary data source in Form Template 2. In particular, my goal is to create a duplicate and editable repeating table based on a specific Form Template 1 Item. For example; A user can create a new Form based on Form Template 2. From there, the user can select to pre-populate the data with a specific Form from Form Template 1. However, when referencing the Form Template 1 as a secondary data source, I can only reference/pull-in the first row of data per each unique form entry in the database. I am well aware of how to reference multiple first-row entries of separate forms, but my issue is getting the data that is repeated amongst the specific "Name". In other words, getting the secondary fields values of a field located in a repeating table.
Here's a visual that may explain better: http://i.imgur.com/UHsnKn2.png?1
Here's also an example of some code I've utilized (VSTA - VB) to pull each form's "Name" field on a 'form load event':
-----------------------
'SecNav = Secondary Data Source Path/Name
'SecNavRows = Path/Node Iteration
Dim
SecNav As XPathNavigator = Me.DataSources("GRC FI FL RECEIVE").CreateNavigator()Dim SecNavRows As XPathNodeIterator = SecNav.Select("/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW", NamespaceManager)
While SecNavRows.MoveNext() MessageBox.Show(SecNavRows.Current.SelectSingleNode("d:CUSTOMER_x0020_NAME", NamespaceManager).Value)
End While
-----------------------
As you can see, the code simply cycles through each form's 'Customer Name' field and outputs the first row's value, but what'd I'd love to get is the ability to say "d:CUSTOMER_x0020_NAME[VARIABLE ROW POSITION]", but any time I use this one a secondary data source, it fails. I've also tried current() filter solutions and I just can't seem to get the convention right. Any help would be greatly appreciated!
Nick