<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Count or increment</title><link>https://www.infopathdev.com:443/forums/thread/75226.aspx</link><pubDate>Tue, 14 Feb 2012 02:29:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75226</guid><dc:creator>jaxkookie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75226.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=75226</wfw:commentRss><description>It has been resolved. I read a post from Jimmy that gave me an idea. I added a field outside of my repeating table. You can increment this field 1 of 2 ways. Set a rule on the repeating table. Add one to that field onchange. This will add one everytime a row is added. A second rule you can be use to set the value of your increment field. You can also do this with code behind. Because i was already using code i went that route after trying the rules</description></item><item><title>Re: Count or increment</title><link>https://www.infopathdev.com:443/forums/thread/75201.aspx</link><pubDate>Mon, 13 Feb 2012 14:54:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:75201</guid><dc:creator>khaliraja</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/75201.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=75201</wfw:commentRss><description>&lt;p&gt;Jimmy,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Did this ever get resolved?&amp;nbsp; I ask because I had a similar issue with incrementing a field.&amp;nbsp; I grabbed numbers from the ID column of a SP library and added 1.&amp;nbsp; So I set a rule to query the library then i used the formula max(@ID)+1.&amp;nbsp; the ID is the library I was querying, thus giving me the most up to date information on the form.&amp;nbsp; Hope this helps.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Count or increment</title><link>https://www.infopathdev.com:443/forums/thread/66243.aspx</link><pubDate>Tue, 03 May 2011 16:08:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66243</guid><dc:creator>jaxkookie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66243.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=66243</wfw:commentRss><description>&lt;p&gt;Thanks Jimmy, the second solution worked perfectly I had to add an additional field because I was grabbing the SP Id number and adding 1, but once I did this in another field I could apply your solution and it returned witht the leading zeros.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;I am struggling a bit with the first solution. I cannot get it to increment or even populate a value. Is there something I am missing in the rule maybe you didn&amp;#39;t post?&lt;/p&gt;</description></item><item><title>Re: Count or increment</title><link>https://www.infopathdev.com:443/forums/thread/66242.aspx</link><pubDate>Tue, 03 May 2011 15:22:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66242</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66242.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=66242</wfw:commentRss><description>&lt;p&gt;To increment a field value, just use a rule to set the field&amp;#39;s value to &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;u&gt;Field&lt;/u&gt; + 1.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This formula should work for appending leading zeros:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;concat(substring(&amp;quot;0000&amp;quot;, string-length(&lt;u&gt;Field&lt;/u&gt;) + 1), &lt;u&gt;Field&lt;/u&gt;)&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Count or increment</title><link>https://www.infopathdev.com:443/forums/thread/66241.aspx</link><pubDate>Tue, 03 May 2011 15:09:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66241</guid><dc:creator>jaxkookie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66241.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=66241</wfw:commentRss><description>&lt;p&gt;I have recently upgraded to IP07. In the process of this new form development I have a few requirements i am trying to figure out. I have figure out how to add a submit button. Now I want to increment a hidden field each time the submit button is clicked. no matter what i have tried I can&amp;#39;t figure the syntax. I have found many posts to set a field, mostly dates, but nothing to add or increment a field value.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also I am tryinmg to figure out how to convert a number field to a 4 digit field. I need to convert 2 to 0002. I have tried data validation and rules but nothing worked. I figure this would need to be in the code. Because I am in the early stage of development I am not fixed on any one language.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;any help or guidence is greatly appreciated.&lt;/p&gt;</description></item></channel></rss>