N
news.microsoft.com
Hi,
I have got an InfoPath form with a single list box on it.
I want to populate the list box with Project names from the MS Project
Server web service, but this
web service is not supported by InfoPath (RPC encoding).
Using scripting, I can retrieve an XML document
containing the Project Names I want to add to the list,
but the list box does not display the values. When I
debug my script and inspect the values, I can see that the list box has got
the
correct number of child nodes, and the "text" property
contains all my values.
In my code fragment below, xmlReply is the response from the Project
Server web service, and xmlProjects is a reference to the
list box.
var nodeList = xmlReply.selectNodes
("//ProjectsStatus/Project");
var xmlProjects =
XDocument.DOM.documentElement.selectSingleNode
("my:lstProjects")
for(var i=0; i < nodeList.length; i++)
{
var oNode = nodeList.item(i)
var sProjName = oNode.selectSingleNode
("./ProjectName").text + "\n";
var oChild = XDocument.DOM.createTextNode(
sProjName );
xmlProjects.appendChild( oChild );
}
Does anyone have any ideas on what I'm doing wrong?
Many thanks,
James.
I have got an InfoPath form with a single list box on it.
I want to populate the list box with Project names from the MS Project
Server web service, but this
web service is not supported by InfoPath (RPC encoding).
Using scripting, I can retrieve an XML document
containing the Project Names I want to add to the list,
but the list box does not display the values. When I
debug my script and inspect the values, I can see that the list box has got
the
correct number of child nodes, and the "text" property
contains all my values.
In my code fragment below, xmlReply is the response from the Project
Server web service, and xmlProjects is a reference to the
list box.
var nodeList = xmlReply.selectNodes
("//ProjectsStatus/Project");
var xmlProjects =
XDocument.DOM.documentElement.selectSingleNode
("my:lstProjects")
for(var i=0; i < nodeList.length; i++)
{
var oNode = nodeList.item(i)
var sProjName = oNode.selectSingleNode
("./ProjectName").text + "\n";
var oChild = XDocument.DOM.createTextNode(
sProjName );
xmlProjects.appendChild( oChild );
}
Does anyone have any ideas on what I'm doing wrong?
Many thanks,
James.