-
-
Checking for null is correct assuming that you expect the node to be physically not present in the DOM at times. If you want to know whether it is blank... that's different.
Also, you don't need to reselect the field multiple times as you've already stored it in a variable.
Try:
1. For node to be physically not present:
var sourcePhDirect = ...
-
Glad you got it figured out! Thanks for sharing the answer with us.
-
Are you using InfoPath 2007 and the multi-select list box control?
-
Great! Glad to hear its working now!
-
http://www.infopathdev.com/resources/references/default.aspx
-
Keep in mind that there are two parts to a drop-down list box: the stored value and the displayed value. The displayed value is pointless to this discussion -- it simply is the text shown to the user so that they don't ever have to see the stored value.
The way the drop-down list box is supposed to work is this:
If a stored value matches the ...
-
Preview is based on whatever your current designer view is. If you want to start in a certain view when priviewing, switch to that view first, then preview.
Verify your open rules do or don't set a default view. Verify your code does or does not set a default view.
-
It is still based on XPath 1.0. I'm not sure when 2.0 support will enter in--probably not until it becomes finalized. It is still in the Candidate Recommendation state, later to become a Proposed Recommendation, and the finally a W3C Recommendaiton. It is still a long way off from being ...
-
The trick, as described above, for your scenari is to use a single field (the root node) to store the active field information.
if (eventObj.Type != ''ContextNode'' || eventObj.IsUndoRedo)
return;
var oRoot = XDocument.DOM.selectSingleNode(''/my:myFields''); // or whatever your root node is.
XDocument.SetNamedNodeProperty(oRoot, ...