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