You searched for the word(s): 12
-
I'm trying your example to see what happens.
I can't compile it because it doesn't recognize SetProperty as a Method of DOM.
Defined as
Private thisXDocument As XDocument
thisXDocument.DOM.setProperty(''SelectEmployeesWithHardwareSoftwareRequest'', ...
-
Thanks Greg. I keep forgetting about the secondary data source.
I created a rule that will populate the @CompanyName field when the user selects the name from the drop down list. It works the first time. But on subsequent selections it doesn't update the @CompanyName field. I tried to set a condition on the rule but that didn't work.
What am ...
-
If you want the data value to be identical in both, set a rule on one to populate the value of the other with the same value as the first.
Greg Collins [InfoPath MVP]
-
If you use script, .NET is not necessary. If you use managed code, you and your users MUST have .NET.
Greg Collins [InfoPath MVP]
-
Use a rule on the drop-down list that populates the field that will store the company name. That rule will filter the web service list for the company whose id matches the selected id in the drop-down list, and then use the matching name to populate the company name field.
Greg Collins [InfoPath MVP]
-
[Our posts just crossed!]
[Ooh, look, I got a green star!]
How's about trying from his example something pretty like:
IXMLDOMDocument3 domXML = (IXMLDOMDocument3) objDO.DOM;
domXML.setProperty( ''SelectionNamespaces'', thisXDocument.DOM.getProperty(''SelectionNamespaces''));
Not tried, don't know about casting to (IXMLDOMDocument3), but the ...
-
sakieboy,
I just looked at CodeWzrd's suggested link above (which I participated in). I assume what he said for managed code is what you want.
The vital bit is:
IXMLDOMDocument3 domXML = (IXMLDOMDocument3) objDO.DOM;
domXML.setProperty( ''SelectionNamespaces'', ''xmlns:dfs=\''http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\'' ...
-
I'm kinda lost at what your talking about. The SelectionNamespace is just the XML node path correct? It seems that what I have below would take care of this issue.
Currently the Namespace is defined up top as
<InfoPathNamespace(''xmlns:xsf=''''http://schemas.microsoft.com/office/infopath/2003/solutionDefinition'''' ...
-
Like I said, that indicates that you have not declared the namespace prefix ns1 for the DOM you're querying off.
What have you done in the way of setting the SelectionNamespace for thisXDocument.GetDOM(''SelectEmployeesWithHardwareSoftwareRequest'')?
According to me, you're going to have to do something yourself, coz I don't think the Vis Stu ...
-
Just tried what you suggested:
Dim myUserNode As IXMLDOMNode = thisXDocument.GetDOM(''SelectEmployeesWithHardwareSoftwareRequest'').selectSingleNode(''.//ns1:EmployeeID'')
And received the following error
Run-time exception thrown : System.Runtime.InteropServices.COMException - Reference to undeclared namespace prefix: 'ns1'.
I also tried ...