Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / December 2005

Tip: Looking for answers? Try searching our database.

populate node from secondary (XML) data source

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
will.horn@gmail.com - 19 Dec 2005 16:34 GMT
My main data source has a group that I would like to prepopulate from
my secondary data source (referencedata.xml) when the form loads.

I'm not too familiar with JScript, but this is what I've tried:

XDocument.DataObjects("referencedata").QueryAdapter.Query();  // is
this needed?
var refdata = XDocument.GetDOM("referencedata");

var runs = XDocument.DOM.selectSingleNode("//runs");
runs = refdata.selectSingleNode("//runs");

I think the problem is in the last line since in the debugger, refdata
looks like it's is loaded correctly.  Can I not simply copy nodes like
this?  Is there another function I need to use?

Thanks,
Will
Will - 20 Dec 2005 15:30 GMT
If anyone is interested, the replaceChild function worked:

var runs = XDocument.DOM.selectSingleNode("//runs");
var refruns = refdata.selectSingleNode("//runs");
XDocument.DOM.selectSingleNode("//runData").replaceChild(refruns, runs);
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.