Quantcast
Channel: BrainStorage
Viewing all articles
Browse latest Browse all 102

Multiple Repeating Tables In A Section Apparently Does Not Work

$
0
0

It appears that there is some problem with having two repeating tables in a section, and trying to write data to them programmatically.

For me, such a structure produced the famous schema validation found non-datatype error that is so popular with the kids today.

I had to modify my Main data source to look like this in order to get around the error:

Split the tables into their own section...for some reason

Split the tables into their own section…for some reason

 

Rather than this:

Don't put both tables in the same section...for some reason

Don’t put both tables in the same section…for some reason

Interestingly, writing to the second repeating table in the section would work, but not the first. I noticed that by changing the order of the sections in the data source, whichever was first would generate the exception, but the values would go into the second section as desired.

Pretty annoying, since the code to write to either section was almost identical, and writing to a single section worked previously, until I had a requirement to split the data into two separate tables with slightly different structures.

I am sure I had the XPath built correctly to do so, but “something” about this approach is not allowed, maybe it’s even documented somewhere?

I’m sure there is a perfectly reasonable explanation for why this didn’t work as I originally designed it, but the generic exception makes it pretty opaque to troubleshoot.


Filed under: C#, InfoPath, Programming, Troubleshooting Tagged: Exception, Repeating Tables, Section

Viewing all articles
Browse latest Browse all 102

Trending Articles