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 / April 2005

Tip: Looking for answers? Try searching our database.

Dynamically read data from sharepoint list using jscript code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Reetu Agarwal - 20 Apr 2005 18:11 GMT
Hi All,

When the Infopath form is loaded I would like to read the sharepoint list
using the jscript code. I know I can create a data connection where it
provides me the option to receive the data from the sharePoint list.

But using jscript code I dont know how to retrieve the values from data
connection and store it in a jscipt array variable. I would then like to
read all the values stored in the jscript array variable.

In short I want to read the data from the sharepoint list and use those
values in my code. I dont want to display these values on Infopath form.

Can you please let me know how to do this.

Thanks,
-Reetu
Bart - 21 Apr 2005 06:53 GMT
hi reetu,

its pretty straigh forward

here is the solution

create a secondary data connection to the sharepoint list and then
use the following script

var strXML;
strXML = XDocument.DataObjects("Secondary datasource name").DOM.xml;
var es = new ActiveXObject("Msxml2.DOMDocument.5.0");       
es.loadXML(strXML);//loads xml document from a string)
XDocument.UI.Alert(es.xml);

hope this helps
bart

> Hi All,
>
[quoted text clipped - 13 lines]
> Thanks,
> -Reetu
Reetu Agarwal - 21 Apr 2005 16:41 GMT
Thanks a lot bart.

Regards,
-Reetu
 
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.