<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Reset project number if it's the start of a new month.</title><link>https://www.infopathdev.com:443/forums/thread/41124.aspx</link><pubDate>Wed, 29 Apr 2009 23:37:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41124</guid><dc:creator>Samir Farid</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41124.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=41124</wfw:commentRss><description>&lt;p&gt;Brett,&lt;/p&gt;
&lt;p&gt;The only possible way I can think of is trying to store a variable&amp;nbsp;in a file outside InfoPath. Xml would probably be the best. Then you can use a Secodary Data Source to receive data from that xml file and check the variable. For example, if the variable is True then a project has already been updated with a new project ID.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Samir&lt;/p&gt;</description></item><item><title>Re: Reset project number if it's the start of a new month.</title><link>https://www.infopathdev.com:443/forums/thread/41094.aspx</link><pubDate>Wed, 29 Apr 2009 17:07:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41094</guid><dc:creator>bsmith</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41094.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=41094</wfw:commentRss><description>&lt;p&gt;Hello Samir,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you for your reply.&amp;nbsp; Yes, that will work except for one issue, if I add that rule it will reset the counter for every project opened that day.&amp;nbsp; I need some way to tell it to only do it for the first document opened that day.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Brett&lt;/p&gt;</description></item><item><title>Re: Reset project number if it's the start of a new month.</title><link>https://www.infopathdev.com:443/forums/thread/41093.aspx</link><pubDate>Wed, 29 Apr 2009 16:57:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41093</guid><dc:creator>Samir Farid</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41093.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=41093</wfw:commentRss><description>&lt;p&gt;Hey Brett,&lt;/p&gt;
&lt;p&gt;Can&amp;#39;t you just get today&amp;#39;s date and check whether the day value is 1. If it is 1 then you reset your counter.&lt;/p&gt;
&lt;p&gt;This function will get the day for you. &lt;/p&gt;
&lt;p&gt;substring(xdDate:Today(), 9, 2)&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Samir&lt;/p&gt;</description></item><item><title>Reset project number if it's the start of a new month.</title><link>https://www.infopathdev.com:443/forums/thread/40991.aspx</link><pubDate>Mon, 27 Apr 2009 03:20:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40991</guid><dc:creator>bsmith</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40991.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=40991</wfw:commentRss><description>&lt;p&gt;Hello again,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks in advance for any help on this one. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have a form in which I create the project ID based on the last two digits of the year, then the month, and then a three digit&amp;nbsp;incremental counter, all concatenated.&amp;nbsp; So a form entered on April 24th would be 0904017 if 16 other forms have already been created in April.&amp;nbsp; Now, the incremental counter needs to reset back to 1 at the beginning of a new month and I am having some trouble getting&amp;nbsp;this to work.&amp;nbsp; So&amp;nbsp;the first project entered in May should reset to 0905001.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Is there any function to subtract a month in xddate?&amp;nbsp; I know&amp;nbsp;that you can use xddate:adddays(date, x) to add days, but I need to subtract the month to see if the last project ID was for last month or not.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Anybody have any suggestions on resetting this counter effectively?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for your help,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Brett&lt;/p&gt;</description></item></channel></rss>