<?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 CONCATENATE PRE LOGIG THREE FIELDS ARCGIS in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/concatenate-pre-logig-three-fields-arcgis/m-p/665745#M51694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;HI PEOPLE OF GIS&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;I Want join Predio field and the Key field to the ID_GESSERV field. I was doing this join in excel based on the formulas, LEFT, RIGHT, MID and CONC.&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;I need the concatenation to always fill the "ID_PREDIO" field with 4 digits,&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;I think there must be a logical script for this that should be based on if&amp;gt; 1000 and &amp;lt;100 = 0 more the "ID_PREDIO" number. If&amp;gt; 1000 and &amp;lt;10 = 00 is the value of the "ID_PREDIO".&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;If&amp;gt; 1000 and &amp;lt;9 = 000 and the value of the "ID_PREDIO"&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;for example:If I receive the value 8 in the ID_PREDIO field, the concatenation will have to add 3 zeros. If you receive the value 190 the concatenation will have to add 1 zero.&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;&lt;A href="https://i.stack.imgur.com/eC9dh.png" style="color: #1d4d5c; border: 0px; font-weight: inherit; text-decoration: underline;"&gt;&lt;IMG alt="enter image description here" src="https://i.stack.imgur.com/eC9dh.png" style="border: 0px; font-weight: inherit;" title="" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 May 2020 13:05:49 GMT</pubDate>
    <dc:creator>PintoJoão</dc:creator>
    <dc:date>2020-05-27T13:05:49Z</dc:date>
    <item>
      <title>CONCATENATE PRE LOGIG THREE FIELDS ARCGIS</title>
      <link>https://community.esri.com/t5/python-questions/concatenate-pre-logig-three-fields-arcgis/m-p/665745#M51694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;HI PEOPLE OF GIS&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;I Want join Predio field and the Key field to the ID_GESSERV field. I was doing this join in excel based on the formulas, LEFT, RIGHT, MID and CONC.&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;I need the concatenation to always fill the "ID_PREDIO" field with 4 digits,&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;I think there must be a logical script for this that should be based on if&amp;gt; 1000 and &amp;lt;100 = 0 more the "ID_PREDIO" number. If&amp;gt; 1000 and &amp;lt;10 = 00 is the value of the "ID_PREDIO".&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;If&amp;gt; 1000 and &amp;lt;9 = 000 and the value of the "ID_PREDIO"&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;for example:If I receive the value 8 in the ID_PREDIO field, the concatenation will have to add 3 zeros. If you receive the value 190 the concatenation will have to add 1 zero.&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;&lt;A href="https://i.stack.imgur.com/eC9dh.png" style="color: #1d4d5c; border: 0px; font-weight: inherit; text-decoration: underline;"&gt;&lt;IMG alt="enter image description here" src="https://i.stack.imgur.com/eC9dh.png" style="border: 0px; font-weight: inherit;" title="" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2020 13:05:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/concatenate-pre-logig-three-fields-arcgis/m-p/665745#M51694</guid>
      <dc:creator>PintoJoão</dc:creator>
      <dc:date>2020-05-27T13:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: CONCATENATE PRE LOGIG THREE FIELDS ARCGIS</title>
      <link>https://community.esri.com/t5/python-questions/concatenate-pre-logig-three-fields-arcgis/m-p/665746#M51695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;11&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;111&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1111&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

s &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"E000186"&lt;/SPAN&gt;

e &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"{}{:&amp;gt;04}{}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; i&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;14&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'E00018600010'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'E00018600110'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'E00018601110'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'E00018611110'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The key is the '0' padding in the middle variable, represented by 'a' above.&lt;/P&gt;&lt;P&gt;s is the start, e is the end values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:08:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/concatenate-pre-logig-three-fields-arcgis/m-p/665746#M51695</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-12-12T04:08:06Z</dc:date>
    </item>
  </channel>
</rss>

