<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Generate sequential number based on fiscal year and month created</title><link>https://www.infopathdev.com:443/forums/thread/97505.aspx</link><pubDate>Fri, 16 May 2014 14:32:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97505</guid><dc:creator>ponch0v</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97505.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=97505</wfw:commentRss><description>&lt;p&gt;I am working in a government environment (locked down, so cant use any third-party solutions) on Infopath 2007 and Sharepoint 2010.&lt;/p&gt;&lt;p&gt;We have request forms that get submitted through an Infopath form and I need to generate two sequential numbers based on data in the form. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;The first needs to be a button on the form that will generate a sequential number based on the fiscal year and month what a date field in the form is. Call this &amp;quot;authority #&amp;quot;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;That is, the first form submitted in May will generate 14-05-001, then 14-05-002, etc. The numbing resets each month, so 14-06-001 is the first form submitted in June. The year would also reset in Oct to 15-10-001, and so on.&lt;/p&gt;&lt;p&gt;The second number is generated using a concat of the calendar year, the sequential number and then another text field. I have this one working by querying a list for the max + 1 of the sequential field, then adding the year and text field. This all gets written back to the list using a CAML submit. Call this &amp;quot;log #&amp;quot;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I just cant figure out how to query the first list (authority #) to know what year/month it is, then get the max + 1 of that criteria, then set a field&amp;#39;s value of that number.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Sorry if this is confusing, let me know if I can clarify. Thanks for any insight.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>