<?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: Leading Zeros for infopath 2010 browser form</title><link>https://www.infopathdev.com:443/forums/thread/71486.aspx</link><pubDate>Fri, 28 Oct 2011 10:27:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71486</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71486.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=71486</wfw:commentRss><description>&lt;p&gt;This formula should also&amp;nbsp;work for adding leading zeros to make three digits:&lt;/p&gt;
&lt;p&gt;concat(substring(&amp;#39;000&amp;#39;, 1, 3 - string-length(&lt;strong&gt;&lt;u&gt;field&lt;/u&gt;&lt;/strong&gt;)), &lt;strong&gt;&lt;u&gt;field&lt;/u&gt;&lt;/strong&gt;)&lt;/p&gt;</description></item><item><title>Re: Leading Zeros for infopath 2010 browser form</title><link>https://www.infopathdev.com:443/forums/thread/71476.aspx</link><pubDate>Thu, 27 Oct 2011 23:17:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71476</guid><dc:creator>Lockdown</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71476.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=71476</wfw:commentRss><description>&lt;p&gt;This can be done by adding two seperate rules to the text box that you are using. I&amp;#39;ve noticed this only works if the text box is set to a String type and not for Integer type text boxes. At least this is the case in Infopath 2007&lt;/p&gt;
&lt;p&gt;Rule 1: Condition - If&amp;nbsp;field1 matches the pattern \d (this means one integer)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Action: Set field1&amp;#39;s value to this expression - concat(&amp;quot;00&amp;quot;,/my:myFields/my:field1)&lt;/p&gt;
&lt;p&gt;Rule 2: Condition - If&amp;nbsp;field1 matches the pattern \d\d (this means&amp;nbsp;two integers)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Action: Set field1&amp;#39;s value to this expression - concat(&amp;quot;0&amp;quot;,/my:myFields/my:field1)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;ve attached a sample form that will do this for you. I also added some data validation to the field to ensure there cannot be more that three numbers in the field.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Leading Zeros for infopath 2010 browser form</title><link>https://www.infopathdev.com:443/forums/thread/71474.aspx</link><pubDate>Thu, 27 Oct 2011 21:11:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71474</guid><dc:creator>Shelly</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71474.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=71474</wfw:commentRss><description>&lt;p&gt;I have read through most of these posts and am still having issues with getting a leading zero to work.&lt;/p&gt;
&lt;p&gt;I have InfoPath 2010&amp;nbsp;form called CRequest3 (atttached)that is being pulled up and filled out in SharePoint.&lt;/p&gt;
&lt;p&gt;I have a field called docSiteID it has to have 3 digits, if a 2 digit number is entered, a leading zero must be added to the field. -we use the data to run reports and a 3 digit number is a must otherwise it errors out.&lt;/p&gt;
&lt;p&gt;I have tried many types of function from your sheets, I guess since I am so new at this I am not understanding how to fill out the boxes correctly.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Please help me. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>