<?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: Clearing a form field</title><link>https://www.infopathdev.com:443/forums/thread/50299.aspx</link><pubDate>Mon, 04 Jan 2010 21:23:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50299</guid><dc:creator>eddyblanco</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50299.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=50299</wfw:commentRss><description>&lt;p&gt;:) InfoPath isn’t strong with Month, Dates. You would need to add a condition something like field1 is not equal to January. Then you would Add an action and set the field/&amp;#39;s to &amp;quot;&amp;quot;. Not sure how you could get the current month on Infopath without code. &lt;/p&gt;</description></item><item><title>Re: Clearing a form field</title><link>https://www.infopathdev.com:443/forums/thread/50298.aspx</link><pubDate>Mon, 04 Jan 2010 21:10:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50298</guid><dc:creator>domenicfz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50298.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=50298</wfw:commentRss><description>&lt;p&gt;OH Crap! Code!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Not sure where to add the code, in the get miles button or the clear miles button.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I am not very familiar with using code in InfoPath but I am also not against figuring it out.&lt;/p&gt;</description></item><item><title>Re: Clearing a form field</title><link>https://www.infopathdev.com:443/forums/thread/50297.aspx</link><pubDate>Mon, 04 Jan 2010 21:03:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50297</guid><dc:creator>eddyblanco</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50297.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=50297</wfw:commentRss><description>&lt;p&gt;I would try something like.&lt;/p&gt;
&lt;p&gt;If you store on a node the previous month something like. that is just one field you could loop al nodes and do the same&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;COLOR:teal;FONT-SIZE:12pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font color="#000000"&gt;XPathNavigator navigator = this.MainDataSource.CreateNavigator();&lt;br /&gt;XPathNavigator PreviousMonth = navigator.SelectSingleNode(&amp;quot;/my:Form/my:PreviousMonth&amp;quot;, this.NamespaceManager);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;COLOR:teal;FONT-SIZE:12pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font color="#000000"&gt;//Now you have the previous month in &amp;quot;PreviousMonth&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;COLOR:teal;FONT-SIZE:12pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font color="#000000"&gt;now you could do something like&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;COLOR:teal;FONT-SIZE:12pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font color="#000000"&gt;string currentmonth = DateTime.Today.Month;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;COLOR:teal;FONT-SIZE:12pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font color="#000000"&gt;// now you got current month&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;COLOR:teal;FONT-SIZE:12pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font color="#000000"&gt;if(currentmonth != PreviousMonth)&lt;br /&gt;{&lt;br /&gt;XPathNavigator somevalue =&lt;br /&gt;navigator.SelectSingleNode(&amp;quot;/my:Form/my:Somefield&amp;quot;, this.NamespaceManager);&lt;br /&gt;somevalue.SetValue(&amp;quot;&amp;quot;);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;COLOR:teal;FONT-SIZE:12pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;font color="#000000"&gt;&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;FONT-SIZE:12pt;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Clearing a form field</title><link>https://www.infopathdev.com:443/forums/thread/50296.aspx</link><pubDate>Mon, 04 Jan 2010 20:35:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50296</guid><dc:creator>domenicfz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50296.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=50296</wfw:commentRss><description>&lt;p&gt;Currently I have multiple sites under my main sharepoint site. These sites are for different customers and each site holds the same type of data/forms but different info in each as it pertains to that certain customer. One of the forms is a CSR form where we can type up a quick log of work we did for that particular customer. I have since added a &amp;quot;Travel&amp;quot; check box to these CSR forms for all customers and when the box is checked there is a field &amp;quot;Miles&amp;quot; that gets populated with the round trip milage for that particular customer. At the end of the month I open a local form through InfoPath and click &amp;quot;get miles&amp;quot;. My form is then populated, using multiple &amp;quot;query using data connections&amp;quot;. Each customer has their own field in this form and that field gets the total number of miles for that customer for that month. It then rounds&amp;nbsp;the numbers and gives me a total at the bottom and then I print it and submit to the proper folks here at my office.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Now, what I have not been able to figure out is how to &amp;quot;clear&amp;quot; the miles on ALL the CSR forms at the same time so that next month I dont get old milage mixed in with new. I have already submited December milage and this month will be doing more CSR&amp;#39;s and at the end of the month I only want January miles.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any Ideas on how to do this? I have tried creating a button &amp;quot;clear miles&amp;quot; and having that set the &amp;quot;miles&amp;quot; field to 0 using various data connections but nothing happens to the CSR &amp;quot;miles&amp;quot; filed when button is pressed. I understand why it is not happening but do not understand how to make this happen.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks in advance&lt;/p&gt;</description></item></channel></rss>