<?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: Adding spaces to numbers</title><link>https://www.infopathdev.com:443/forums/thread/98394.aspx</link><pubDate>Mon, 21 Jul 2014 00:59:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:98394</guid><dc:creator>donstephen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/98394.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=98394</wfw:commentRss><description>&lt;p&gt;Hi Kevin,&lt;/p&gt;&lt;p&gt;It would be difficult to explain this formula as a whole, but we can dissect the whole formula so it would be easier for you to understand.&lt;/p&gt;&lt;p&gt;The whole formula is composed of three substring functions separated by spaces (&amp;quot; &amp;quot;).&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;substring(text, starting position, character count)&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;text represents which field you are taking the value from,&lt;br /&gt;the second value is the character count where the returned value will start from&lt;br /&gt;last value is&amp;nbsp;the number of&amp;nbsp;characters which will be returned starting from the &lt;/p&gt;&lt;p&gt;using spaghetti as a sample word and a formula substring(field1, 4, 3), this formula will return a value of &lt;strong&gt;ghe&lt;/strong&gt; since &lt;em&gt;G&lt;/em&gt; is the fourth letter and from there, it will return 3 letters, in this case &lt;em&gt;GHE&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;The first substring from you formula, the character count is represented by another formula which uses a &lt;strong&gt;string-length &lt;/strong&gt;function with a subtraction operator. This would mean the total character count of the current field (represented by a dot), minus a value which can either be constant or dynamic if you will be using a field.&lt;br /&gt;&lt;br /&gt;substring(., #, &lt;strong&gt;string-length(.) - #&lt;/strong&gt;)&lt;br /&gt;&lt;br /&gt;The second and third substring formulas are similar, however this time the &lt;strong&gt;string-length &lt;/strong&gt;function is used for the character count where the returned value will start from.&lt;br /&gt;&lt;br /&gt;I hope this makes sense.&lt;/p&gt;</description></item><item><title>Adding spaces to numbers</title><link>https://www.infopathdev.com:443/forums/thread/98369.aspx</link><pubDate>Thu, 17 Jul 2014 19:37:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:98369</guid><dc:creator>KEV1N</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/98369.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=98369</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I need to format a number like a UPC. The number is 12 characters (have a 14 character text box)&amp;nbsp;and should be in the format 1 2345678912 3. I know I need something similar to the formula below inside of a rule, but do not understand what numbers go in place of the #.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;concat(substring(., #, string-length(.) - #), &amp;quot; &amp;quot;, substring(., string-length(.) - #, #), &amp;quot; &amp;quot;, substring(., string-length(.) - #, #))&lt;/p&gt;</description></item></channel></rss>