Hi guys, new infopath developer here and I'm running into a problem trying to access the value from a repeated section. I'm sure it's very simple but it's eluding me at the moment.
I currently have a form with a text box for a user to insert comments. From what I understand, infopath won't communicate with a database directly if a field exceeds 255 characters, so I put the textbox in a repeated section so if they need to exceed 255, they can insert additional textboxes to complete their comment. I can retrieve the first textbox value without a problem, however the 2nd textbox throws an error of "Object reference not set to an instance of an object. "
Is it simply a syntax error? I thought I could navigate the repeating sections by adding [1],[2],[3], etc to the end of the xpath. It works for the first one [1] but not anything after.
Dim IssueDescription As String = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:gIssueDescription/my:rsIssueDescription/my:tbIssueDescription[1]", NamespaceManager).Value
Dim IssueDescription2 As String = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:gIssueDescription/my:rsIssueDescription/my:tbIssueDescription[2]", NamespaceManager).Value
Also, is there a way to work around the 255 character limit without resorting to using webservices?
I appreciate any input!
thanks