Optional Fields in Infopath; Getting the xml node with VBA
Posted
by Sunscreen
on Stack Overflow
See other posts from Stack Overflow
or by Sunscreen
Published on 2010-04-12T08:49:44Z
Indexed on
2010/04/12
8:53 UTC
Read the original article
Hit count: 305
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
© Stack Overflow or respective owner