<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Survey123 - Leading Zeros for integer in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-leading-zeros-for-integer/m-p/806984#M12339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This would do the job, assuming that your integer question has &lt;EM&gt;nu&lt;/EM&gt; for name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;if(string-length(${nu})=1,concat("000",${nu}),if(string-length(${nu})=2,concat("00",${nu}),if(string-length(${nu})=3,concat("0",${nu}),${nu})))&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #18b858;"&gt;&lt;TH style="width: 11%;"&gt;&lt;SPAN style="color: #ffffff;"&gt;type&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="width: 10%;"&gt;&lt;SPAN style="color: #ffffff;"&gt;name&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="width: 18%;"&gt;&lt;SPAN style="color: #ffffff;"&gt;label&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="width: 24.7766%;"&gt;&lt;SPAN style="color: #ffffff;"&gt;calculation&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="width: 27.2234%;"&gt;&lt;SPAN style="color: #ffffff;"&gt;bind::esri:fieldType&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 11%;"&gt;integer&lt;/TD&gt;&lt;TD style="width: 10%;"&gt;nu&lt;/TD&gt;&lt;TD style="width: 18%;"&gt;A number&lt;/TD&gt;&lt;TD style="width: 24.7766%;"&gt;&lt;/TD&gt;&lt;TD style="width: 27.2234%;"&gt;null&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 11%;"&gt;calculate&lt;/TD&gt;&lt;TD style="width: 10%;"&gt;nu_trail&lt;/TD&gt;&lt;TD style="width: 18%;"&gt;A number (trailing 0)&lt;/TD&gt;&lt;TD style="width: 24.7766%;"&gt;if(string-length(${nu})=1,concat("000",${nu}),if(string-length(${nu})=2,concat("00",${nu}),if(string-length(${nu})=3,concat("0",${nu}),${nu})))&lt;/TD&gt;&lt;TD style="width: 27.2234%;"&gt;esriFieldTypeString&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Apr 2020 20:07:10 GMT</pubDate>
    <dc:creator>IsmaelChivite</dc:creator>
    <dc:date>2020-04-23T20:07:10Z</dc:date>
    <item>
      <title>Survey123 - Leading Zeros for integer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-leading-zeros-for-integer/m-p/806983#M12338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to format a field to 4 digits in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the user would input a number and&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if 1 ----&amp;gt; the resulting number is &lt;STRONG&gt;0001&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if 12 ----&amp;gt; the resulting number is &lt;STRONG&gt;0012&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to format this?&lt;/P&gt;&lt;P&gt;the field type is an integer and I put a length limit to 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 17:36:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-leading-zeros-for-integer/m-p/806983#M12338</guid>
      <dc:creator>PanGIS</dc:creator>
      <dc:date>2020-04-23T17:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 - Leading Zeros for integer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-leading-zeros-for-integer/m-p/806984#M12339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This would do the job, assuming that your integer question has &lt;EM&gt;nu&lt;/EM&gt; for name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;if(string-length(${nu})=1,concat("000",${nu}),if(string-length(${nu})=2,concat("00",${nu}),if(string-length(${nu})=3,concat("0",${nu}),${nu})))&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #18b858;"&gt;&lt;TH style="width: 11%;"&gt;&lt;SPAN style="color: #ffffff;"&gt;type&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="width: 10%;"&gt;&lt;SPAN style="color: #ffffff;"&gt;name&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="width: 18%;"&gt;&lt;SPAN style="color: #ffffff;"&gt;label&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="width: 24.7766%;"&gt;&lt;SPAN style="color: #ffffff;"&gt;calculation&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="width: 27.2234%;"&gt;&lt;SPAN style="color: #ffffff;"&gt;bind::esri:fieldType&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 11%;"&gt;integer&lt;/TD&gt;&lt;TD style="width: 10%;"&gt;nu&lt;/TD&gt;&lt;TD style="width: 18%;"&gt;A number&lt;/TD&gt;&lt;TD style="width: 24.7766%;"&gt;&lt;/TD&gt;&lt;TD style="width: 27.2234%;"&gt;null&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 11%;"&gt;calculate&lt;/TD&gt;&lt;TD style="width: 10%;"&gt;nu_trail&lt;/TD&gt;&lt;TD style="width: 18%;"&gt;A number (trailing 0)&lt;/TD&gt;&lt;TD style="width: 24.7766%;"&gt;if(string-length(${nu})=1,concat("000",${nu}),if(string-length(${nu})=2,concat("00",${nu}),if(string-length(${nu})=3,concat("0",${nu}),${nu})))&lt;/TD&gt;&lt;TD style="width: 27.2234%;"&gt;esriFieldTypeString&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 20:07:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-leading-zeros-for-integer/m-p/806984#M12339</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2020-04-23T20:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 - Leading Zeros for integer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-leading-zeros-for-integer/m-p/806985#M12340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the late answer: it is exactly what I was looking for!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2020 09:45:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-leading-zeros-for-integer/m-p/806985#M12340</guid>
      <dc:creator>PanGIS</dc:creator>
      <dc:date>2020-06-16T09:45:50Z</dc:date>
    </item>
  </channel>
</rss>

