{"id":6809,"date":"2018-06-07T18:52:02","date_gmt":"2018-06-07T18:52:02","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=6809"},"modified":"2020-07-02T11:16:05","modified_gmt":"2020-07-02T18:16:05","slug":"leading-zeros-in-front-of-number","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/leading-zeros-in-front-of-number\/","title":{"rendered":"Putting Leading Zeros in Front of a Number"},"content":{"rendered":"<p>How do you put leading zeros in front of a number in eFORMz? Let&#8217;s say a numeric value of 4.69 needs to be converted to\u00a000000000469. There are at least two methods of controlling the total length of the field in question.\u00a0Both methods are demonstrated in the following sample:\u00a0<a href=\"\/support\/wp-content\/uploads\/2018\/06\/LeftFillSample2.zip\">LeftFillSample<\/a><\/p>\n<p>The first method would involve creating a variable and setting the value with the required number of zeros. Next, that variable would be inserted as a string in front of the numeric value. If the number of zeros changes, a substring function could be employed or the &#8220;fill&#8221; variable containing the number of zeros can be adjusted accordingly.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6810\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method1.png\" alt=\"\" width=\"582\" height=\"270\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method1.png 582w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method1-300x139.png 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method1-150x70.png 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method1-250x116.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method1-550x255.png 550w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method1-388x180.png 388w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/a><\/p>\n<p>The second method might be more attractive for values with commas and decimal points that need to be removed. It involves replacing the commas and decimals then using a numeric format procedure to add the necessary number of zeros.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-6811\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method2.png\" alt=\"\" width=\"326\" height=\"602\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method2.png 326w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method2-162x300.png 162w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method2-81x150.png 81w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method2-250x462.png 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method2-97x180.png 97w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2018\/06\/Method2-271x500.png 271w\" sizes=\"(max-width: 326px) 100vw, 326px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do you put leading zeros in front of a number in eFORMz? Let&#8217;s say a numeric value of 4.69 needs to be converted to\u00a000000000469. There are at least two methods of controlling the total length of the field in question.\u00a0Both methods are demonstrated in the following sample:\u00a0LeftFillSample The first method would involve creating a [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,115],"tags":[100],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/6809"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=6809"}],"version-history":[{"count":2,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/6809\/revisions"}],"predecessor-version":[{"id":8220,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/6809\/revisions\/8220"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=6809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=6809"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=6809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}