<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Why a For loop does not work in a Web Form Browser</title><link>https://www.infopathdev.com:443/forums/thread/71535.aspx</link><pubDate>Mon, 31 Oct 2011 13:51:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71535</guid><dc:creator>Michael Vasquez</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71535.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=71535</wfw:commentRss><description>&lt;p&gt;I sent you another reply in a previous post.&amp;nbsp; I will try the try::catch.&amp;nbsp; Currently, when I run the for loop, I get no errors in the Web form.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Why a For loop does not work in a Web Form Browser</title><link>https://www.infopathdev.com:443/forums/thread/71507.aspx</link><pubDate>Fri, 28 Oct 2011 22:11:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71507</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71507.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=71507</wfw:commentRss><description>&lt;p&gt;Hi - I replied to your other post with a sample on using a rule to get this information - there is no reason you should have to use code for it: &lt;a href="http://www.infopathdev.com/forums/p/20624/71436.aspx#71436"&gt;http://www.infopathdev.com/forums/p/20624/71436.aspx#71436&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure why your code is failing in the browser - any errors? You may want to add a try catch and populate another field with any error messages to track it down. &lt;/p&gt;</description></item><item><title>Why a For loop does not work in a Web Form Browser</title><link>https://www.infopathdev.com:443/forums/thread/71498.aspx</link><pubDate>Fri, 28 Oct 2011 18:27:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71498</guid><dc:creator>Michael Vasquez</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71498.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=71498</wfw:commentRss><description>&lt;p&gt;Why does the below code in the Infopath Form work&amp;nbsp;but does not work&amp;nbsp;in a Web enabled Form.&amp;nbsp; How can I fix this.&amp;nbsp; I have posted this in many posts without a resolution.&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&lt;font color="#000000"&gt;Dim xPath As XPathNavigator = DataSources(&amp;quot;SharePoint Training&amp;quot;).CreateNavigator()&lt;br /&gt;Dim ns As XmlNamespaceManager = Me.NamespaceManager&lt;br /&gt;Dim SeatIter As XPathNodeIterator = xPath.Select(&amp;quot;/dfs:myFields/dfs:dataFields/dfs:SharePoint_Training/@Seat__&amp;quot;, ns)&lt;br /&gt;Dim classDate As XPathNodeIterator = xPath.Select(&amp;quot;/dfs:myFields/dfs:dataFields/dfs:SharePoint_Training/@Class_Date&amp;quot;, ns)&lt;br /&gt;Dim formClassDate As String = xForm.SelectSingleNode(&amp;quot;/my:SharePointTraining/my:dClassDate&amp;quot;, ns).Value&lt;br /&gt;Dim availSeats As XPathNavigator = xForm.SelectSingleNode(&amp;quot;/my:SharePointTraining/my:AvailSeats&amp;quot;, ns)&lt;br /&gt;Dim cnt As String = 0&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000"&gt;For i = 1 To 15&lt;br /&gt;&amp;nbsp; classDate.MoveNext()&lt;br /&gt;&amp;nbsp; sDate = Left(classDate.Current.Value, 10)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000"&gt;&amp;nbsp; If sDate = formClassDate Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cnt = cnt + 1&lt;br /&gt;&amp;nbsp; Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit For&lt;br /&gt;&amp;nbsp; End If&lt;br /&gt;Next&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000"&gt;availSeats.SetValue(cnt)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;The cnt is 0 in the Web enabled form and currently, it should be 2&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;The sharepoint list contains many previous dates&amp;nbsp;of the same&amp;nbsp;class.&amp;nbsp; I want to get the total count of available seats for an upcoming&amp;nbsp;class&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;Is there a way I can accomplish the same thing using rules.&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;TIA Mike&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>