<?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-number formatting with leading zeros</title><link>https://www.infopathdev.com:443/forums/thread/49031.aspx</link><pubDate>Fri, 13 Nov 2009 10:09:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49031</guid><dc:creator>Svetoslav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49031.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=49031</wfw:commentRss><description>&lt;p&gt;Hi dalmeidd, &lt;/p&gt;
&lt;p&gt;&amp;nbsp;it will be very easy if you apply some Jscript code. It will not include more than 10 lines. If you haven&amp;#39;t solved the problem&amp;nbsp;here is a very simple code how do it:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;XDocument.DataObject[&amp;quot;Data connection name&amp;quot;].Query;&lt;/p&gt;
&lt;p&gt;var objList = XDocument.DataObjects[&amp;quot;Data connection name&amp;quot;].DOM;&lt;/p&gt;
&lt;p&gt;objList .SetProperty(&amp;quot;.....&amp;quot;)&lt;/p&gt;
&lt;p&gt;var nodes = objList .selectNodes(&amp;quot;here is the dfs path\@ID&amp;quot;);&lt;/p&gt;
&lt;p&gt;maxID = nodes.Math.Util(nodes)&lt;/p&gt;
&lt;p&gt;uniqueID = maxID +1;&lt;/p&gt;
&lt;p&gt;while ((uniqueID.toString()).length&amp;nbsp;&amp;lt;number of&amp;nbsp;length you want&amp;nbsp;)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;uniqueID = &amp;quot;0&amp;quot;+uniqueID; &lt;/p&gt;
&lt;p&gt;}&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a very fast example so there can be some errors. But the idea is correct. Hope you get it fast. &lt;/p&gt;
&lt;p&gt;Regards, &lt;/p&gt;
&lt;p&gt;Svetoslav &lt;/p&gt;</description></item><item><title>Re: Auto-number formatting with leading zeros</title><link>https://www.infopathdev.com:443/forums/thread/40510.aspx</link><pubDate>Fri, 10 Apr 2009 15:04:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40510</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40510.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=40510</wfw:commentRss><description>&lt;p&gt;Sorry for the delay on getting back to this thread! I&amp;#39;m confused as to what multiple submits have to do with this? At any rate, you can submit using rules, and set up multiple submit data connections and use rules and conditions to choose which connection to submit with. What do you mean by &amp;#39;nothing shows on the front end&amp;#39;? Where are you submitting to?&lt;/p&gt;</description></item><item><title>Re: Auto-number formatting with leading zeros</title><link>https://www.infopathdev.com:443/forums/thread/40326.aspx</link><pubDate>Sat, 04 Apr 2009 12:10:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40326</guid><dc:creator>dalmeidd</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40326.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=40326</wfw:commentRss><description>The formula is a rule and I was able to create the conditions but it doesn&amp;#39;t work because the submit button only works with one data connection. I tried to create multiple data connections based based on the number of rules but it still doesn&amp;#39;t work. when i submit, it says the form is submitted succesfully but nothing shows on the front end. What else can I can? Thanks</description></item><item><title>Re: Auto-number formatting with leading zeros</title><link>https://www.infopathdev.com:443/forums/thread/40309.aspx</link><pubDate>Sat, 04 Apr 2009 00:38:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40309</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40309.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=40309</wfw:commentRss><description>&lt;p&gt;Hmmm. I&amp;#39;m not sure if there is a formulaic way to pad a number with zero in InfoPath. Is this formula in a default value? Or a rule? In a rule, you could set conditions, like if max(@ID) + 1 is less than 10 use the formula concat(&amp;quot;LR-DP- 000&amp;quot;, max(@ID) + 1) and if max(@ID) + 1 is greater than 9 but less than 100 use the formula concat(&amp;quot;LR-DP- 00&amp;quot;, max(@ID) + 1)&amp;nbsp; and so forth... but if you are using a default, you&amp;#39;d have to try to make the default conditional. There are ways to do that (see &lt;a href="http://blogs.msdn.com/infopath/archive/2006/11/27/conditional-default-values.aspx"&gt;this&lt;/a&gt; post) but they can get rather complicated...&lt;/p&gt;</description></item><item><title>Auto-number formatting with leading zeros</title><link>https://www.infopathdev.com:443/forums/thread/40300.aspx</link><pubDate>Fri, 03 Apr 2009 18:29:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40300</guid><dc:creator>dalmeidd</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40300.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=40300</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m trying to create auto number with leading zeros but it&amp;#39;s not quite working. the format i want is&amp;nbsp;&amp;quot;LR-DP-0001&amp;quot;, with the number incrementing like 0010, 0110, 1110.&amp;nbsp;Currently&amp;nbsp;the code i&amp;#39;m using is: concat(&amp;quot;LR-DP- &amp;quot;, max(@ID) + 1). I don&amp;#39;t know how to do the leading zero. Help?&lt;/p&gt;</description></item></channel></rss>