<?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: Auto generate unique ID</title><link>https://www.infopathdev.com:443/forums/thread/98100.aspx</link><pubDate>Tue, 24 Jun 2014 04:44:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:98100</guid><dc:creator>Lan-Huang</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/98100.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=98100</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks sir.&lt;/p&gt;&lt;p&gt;I have a another solution so solve&amp;nbsp; it. I create two more columns&amp;nbsp; to&amp;nbsp; get the year and the number in the list,&amp;nbsp; if the year is not equal to the year now, the value will be 0, if the year is same, then max+1,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Auto generate unique ID</title><link>https://www.infopathdev.com:443/forums/thread/97934.aspx</link><pubDate>Fri, 13 Jun 2014 04:47:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97934</guid><dc:creator>donstephen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97934.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97934</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Lan-Huang,&lt;/p&gt;&lt;p&gt;Generally the idea here is to query the last xml file sent and use it&amp;#39;s ID as the basis. If you are querying a large amount let&amp;#39;s say a thousand XMLs, then querying the items and counting the rows is not advisable. In the formula used, you will notice a &lt;strong&gt;MAX(ID)&lt;/strong&gt; function which will only returns the highest number in the column, in these case the highest ID number.&amp;nbsp;The count(ID) will surely affect your form&amp;#39;s performance at one point in time when you area already querying a huge volume.&lt;br /&gt;&lt;br /&gt;The best approach I think is to use a date range in order to just query the items submitted within the current week or current month (depending on how frequent items are submitted). From there, use the MAX(ID) approach to set the next generated number.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m still unsure if you not using a database or not. If so, kindly provide the type of database you are using so I would be able to provide you with a more concrete solution.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;</description></item><item><title>Re: Auto generate unique ID</title><link>https://www.infopathdev.com:443/forums/thread/97928.aspx</link><pubDate>Thu, 12 Jun 2014 16:28:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97928</guid><dc:creator>Lan-Huang</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97928.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97928</wfw:commentRss><description>hi donstephen,
Thank you so much for your reply.
 I hava a idea that i can write the year and the number in a xml file , and read it ,then use the year +(number)+1 to be the ID , but I am not sure it is
realizable or write a data in a datatable in db, or count the numbers of the list in a webservice then reference the webservice ,  for a new guy,  don&amp;#39;t know which way is better</description></item><item><title>Re: Auto generate unique ID</title><link>https://www.infopathdev.com:443/forums/thread/97927.aspx</link><pubDate>Thu, 12 Jun 2014 14:50:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97927</guid><dc:creator>donstephen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97927.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97927</wfw:commentRss><description>&lt;p&gt;Hi Lan-Huang,&lt;br /&gt;&lt;br /&gt;May I know where you are submitting&amp;nbsp;your items to? In order to generate the numbers, you will need to have a basis and&amp;nbsp;this would not be possible if you do not have a database (i.e. submitting the form/s via e-mail only).&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;</description></item><item><title>Re: Auto generate unique ID</title><link>https://www.infopathdev.com:443/forums/thread/97919.aspx</link><pubDate>Thu, 12 Jun 2014 05:05:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97919</guid><dc:creator>Lan-Huang</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97919.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97919</wfw:commentRss><description>hi, donstephen

I have a similar request to generate ID , but I donot have a db ,how can i get the ID ?
the ID should be like 201400001,201400010,.....,20150001,201500002, every year the numbers should start from 0000 again .


Thanks</description></item><item><title>Re: Auto generate unique ID</title><link>https://www.infopathdev.com:443/forums/thread/97898.aspx</link><pubDate>Wed, 11 Jun 2014 07:16:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97898</guid><dc:creator>sbiju7</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97898.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97898</wfw:commentRss><description>&lt;p&gt;Hi donstepehen,&lt;/p&gt;
&lt;p&gt;Finally i got the solution:D&lt;/p&gt;
&lt;p&gt;Thank you so much for your valuabale time and for that formula :) &lt;/p&gt;</description></item><item><title>Re: Auto generate unique ID</title><link>https://www.infopathdev.com:443/forums/thread/97894.aspx</link><pubDate>Wed, 11 Jun 2014 06:07:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97894</guid><dc:creator>donstephen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97894.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97894</wfw:commentRss><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Yes that is correct, the existing ID will determine the generated ID.&amp;nbsp;A quick resolution is to&amp;nbsp;add another rule which generates the value CX0000000001 for the ID, with the condition&amp;nbsp;if the returned query is less than 1 or&amp;nbsp;equal to 0. I hope this makes sense, if not kindly attach a sample of copy of your form so I could modify your rules a bit.&lt;/p&gt;&lt;p&gt;Regards,&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Auto generate unique ID</title><link>https://www.infopathdev.com:443/forums/thread/97893.aspx</link><pubDate>Wed, 11 Jun 2014 05:51:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97893</guid><dc:creator>sbiju7</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97893.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97893</wfw:commentRss><description>&lt;p&gt;Hi donstephen,&lt;/p&gt;
&lt;p&gt;Thanx for your reply.&lt;/p&gt;
&lt;p&gt;When I use the formula, I got&amp;nbsp;NaN error.I am new to infopath and I didnt get a logic for the first submission.Since there should be a existing ID i think this is why the error occured.Can you please elaborate the solution since i am a beginner..... &lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;</description></item><item><title>Re: Auto generate unique ID</title><link>https://www.infopathdev.com:443/forums/thread/97875.aspx</link><pubDate>Tue, 10 Jun 2014 07:19:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97875</guid><dc:creator>donstephen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97875.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97875</wfw:commentRss><description>&lt;p&gt;Hi sbiju7,&lt;/p&gt;&lt;p&gt;Please try this formula below&amp;nbsp;to generate a consecutive unique ID for your form:&lt;/p&gt;&lt;p&gt;&lt;i&gt;concat(&amp;quot;CX&amp;quot;, concat(substring(&amp;quot;000000000&amp;quot;, string-length(max(&lt;b&gt;&lt;u&gt;ID&lt;/u&gt;&lt;/b&gt;) + 1)), max(&lt;b&gt;&lt;u&gt;ID&lt;/u&gt;&lt;/b&gt;) + 1))&lt;/i&gt;&lt;/p&gt;&lt;p&gt;Note that this formula needs to query the database first before it can generate the number, and then use the max ID of the returned value&amp;nbsp;for determining the number of zeros (0) and the next value for the generated ID. Also, the database should have at least 1 entry in order for the formula to work, since the generated ID is based on the returned ID. So you would need to add logic when submitting data&amp;nbsp;so that the first submit should work, or create a sample data instead for the first one. The only downside I can think of is when two or more users submit entries simultaneously, the&amp;nbsp;generated ID&amp;nbsp;will get duplicated.&amp;nbsp;Hope this helps,&lt;/p&gt;&lt;p&gt;Regards,&amp;nbsp;&lt;/p&gt;</description></item><item><title>Auto generate unique ID</title><link>https://www.infopathdev.com:443/forums/thread/97848.aspx</link><pubDate>Mon, 09 Jun 2014 05:55:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97848</guid><dc:creator>sbiju7</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97848.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97848</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a requirement to generate unique ID for each infopath form in 2007, when it is loaded. The format of ID is CX0000000001,where CX remains constant and all the number part are padded with zeroes.&lt;/p&gt;
&lt;p&gt;For the next form loaded, the ID should be CX0000000002 and goes on like....... CX0000000010........CX0000000100...etc.Could you please help me to find a way?&lt;/p&gt;</description></item></channel></rss>