Optional Fields in Infopath; Getting the xml node with VBA
- by Sunscreen
Hi all,
I use vb to get data through my form. I have some optional fileds in my form and I have this problem with the following code:
MsgBox(myXPathNavigator.SelectSingleNode("/my:Status/my:Questions/my:Questions1", _
Me.NamespaceManager).IsNode.ToString)
When the optional filed 'Questions1' is inserted to the form I get the value 'true' by the IsNode function. If the field it is not inserted I have an exception,
stating that the reference is not correct (and it is indeed true). Is there a way to verify about a node, whether it is present or not in my form?
Thanks in advance,
Sun