<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Web Services</title><link>https://www.infopathdev.com:443/forums/48.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Creating a loop from a Web Service data source failing</title><link>https://www.infopathdev.com:443/forums/thread/30461.aspx</link><pubDate>Tue, 15 Jul 2008 18:36:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30461</guid><dc:creator>CherokeeKid</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30461.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=30461</wfw:commentRss><description>&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;Thanks Clay for the suggestion. I will try it. I still need the ability to loop through the nodes. Below is &lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;what I have tried so far.&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;/font&gt;&amp;nbsp; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;Using Secondary (Web Service) data source.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;In the Form View I query the &amp;quot;GetFilteredDataset&amp;quot; and populate a repeating table.&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;On Button Click event I attempt to loop thru the nodes with the goal of setting one node to &amp;quot;true&amp;quot;&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;oSelAll.setProperty(&amp;quot;SelectionNamespaces&amp;quot;,&amp;#39; &lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count:1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;xmlns:ns2=&amp;quot;http://tempuri.org/WALookupDS.xsd&amp;quot; &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count:1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;&lt;span style="mso-tab-count:1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count:1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;xmlns:tns=&amp;quot;http://tempuri.org/&amp;quot; &amp;#39;);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;// This works - returns the correct dataFields nodes with correct data shown in the QuickWatch from the Data Source&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;oViewOne = XDocument.GetDOM(&amp;quot;GetFilteredDataset&amp;quot;).selectSingleNode(&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetFilteredDatasetResponse/tns:GetFilteredDatasetResult/ns2:WALookupDS&amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;// DOES NOT WORK - it returns the &lt;strong&gt;queryFields&lt;/strong&gt; nodes defined in the QuickWatch window &lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;// but with &lt;strong&gt;dataFields&lt;/strong&gt; data &lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;oViewSel = XDocument.GetDOM(&amp;quot;GetFilteredDataset&amp;quot;).selectNodes(&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetFilteredDatasetResponse/tns:GetFilteredDatasetResult/NewDataSet/Table&amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;// DOES NOT WORK -Same as above &lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;oViewSels= XDocument.GetDOM(&amp;quot;GetFilteredDataset&amp;quot;).selectNodes(&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetFilteredDatasetResponse/tns:GetFilteredDatasetResult/ns2:WALookupDS&amp;quot;);&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;// returned correct node count&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;of dataFields but data and nodes are incorrect (same as above)&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;oViewCnt = XDocument.GetDOM(&amp;quot;GetFilteredDataset&amp;quot;).selectNodes(&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetFilteredDatasetResponse/tns:GetFilteredDatasetResult/ns2:WALookupDS/ns2:WAPrimary&amp;quot;).length;&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Since I cannot get the selectNodes to work, I cannot build a loop to iterate the nodes&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Creating a loop from a Web Service data source failing</title><link>https://www.infopathdev.com:443/forums/thread/30438.aspx</link><pubDate>Tue, 15 Jul 2008 05:39:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30438</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30438.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=30438</wfw:commentRss><description>&lt;p&gt;If you want to set all records to a value you can use a set field action.&amp;nbsp; If it is triggered from outside the repeating structure and does not ahave a filter for a specific row then by default all repeating fields&amp;nbsp;will be set with the value.&lt;/p&gt;</description></item><item><title>Creating a loop from a Web Service data source failing</title><link>https://www.infopathdev.com:443/forums/thread/30430.aspx</link><pubDate>Mon, 14 Jul 2008 18:43:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30430</guid><dc:creator>CherokeeKid</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30430.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=30430</wfw:commentRss><description>&lt;p&gt;I have a form view with a repeating table bound to a Secondary web service data source. I want to create a &lt;br /&gt;jscript event that will loop through all the nodes and set the value of a node in each row.&lt;/p&gt;
&lt;p&gt;I have reviewed and tried several examples, but nothing works. When I try to create the While or For loop, &lt;br /&gt;some cases will get the first record only, other attempts return no records or errors as below. &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;var oSelAllDOM = XDocument.DataObjects[&amp;quot;GetFilteredDataset&amp;quot;];&lt;/p&gt;
&lt;p&gt;var oSelAll = XDocument.GetDOM(&amp;quot;GetFilteredDataset&amp;quot;);&lt;/p&gt;
&lt;p&gt;oSelAll.setProperty(&amp;quot;SelectionNamespaces&amp;quot;,&amp;#39; xmlns:ns2=&amp;quot;&lt;a href="http://tempuri.org/WALookupDS.xsd"&gt;http://tempuri.org/WALookupDS.xsd&lt;/a&gt;&amp;quot; xmlns:dfs=&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"&gt;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&lt;/a&gt;&amp;quot;&amp;nbsp;xmlns:tns=&amp;quot;&lt;a href="http://tempuri.org/"&gt;http://tempuri.org/&lt;/a&gt;&amp;quot; &amp;#39;);&lt;/p&gt;
&lt;p&gt;var oViewSels;&lt;br /&gt;var oViewSel;&lt;/p&gt;
&lt;p&gt;oViewSel = oSelAll.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/tns:GetFilteredDatasetResponse/tns:GetFilteredDatasetResult/ns2:WALookupDS&amp;quot;);&lt;br /&gt;// I can verify the text and xml is being returned when viewed in the QuckWatch debugger&lt;/p&gt;
&lt;p&gt;oViewSels = oViewSel.SelectNodes(); // object doesn&amp;#39;t support the method or property&lt;/p&gt;
&lt;p&gt;any help would be appreciated.&lt;/p&gt;</description></item></channel></rss>