<?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: Using Field Calculator to add a character in a field in ArcPro in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545821#M23911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Zach,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In theory, you could also just do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!NumberBefore!.replace(".",".0")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should just replace the period with a period and a zero. You should only have to put that in the top section and not need a Code Block, I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rachel&lt;/P&gt;&lt;P&gt;Esri Support Services&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Aug 2019 21:01:03 GMT</pubDate>
    <dc:creator>rachelg_esri</dc:creator>
    <dc:date>2019-08-22T21:01:03Z</dc:date>
    <item>
      <title>Using Field Calculator to add a character in a field in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545817#M23907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm attempting to add a character to an ID field in ArcPro (eg. 2.14 -&amp;gt; 2.014, 2.15 -&amp;gt; 2.015, etc.). Rather than manually do the couple hundred attributes, I'm sure there is a way to do this with a code block in Field Calculator but I can't seem to figure it out. Does anyone have any tips? Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2019 18:54:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545817#M23907</guid>
      <dc:creator>ZachSvoboda</dc:creator>
      <dc:date>2019-08-22T18:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Calculator to add a character in a field in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545818#M23908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Zach,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a pattern to where you want to place the character? In other words, is it always going after the second character (in the above example the 2 and the period are the first two characters), or is it always going to be after the decimal, etc?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There should be a way to split the string, concatenate it with the desired character, and then re-concatenate the string halves. It'll only work if there's a pattern though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rachel&lt;/P&gt;&lt;P&gt;Esri Support Services&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2019 19:56:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545818#M23908</guid>
      <dc:creator>rachelg_esri</dc:creator>
      <dc:date>2019-08-22T19:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Calculator to add a character in a field in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545819#M23909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it will always be after the decimal. Basically it's a double ID with the number before the decimal being the group ID and after the decimal being the attribute ID and I'm just trying to add a hundreds place to the attribute ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've done similar things in Desktop but I'm not very experienced with Pro (or python code blocks) and believe I'm just missing some element or having something in the wrong spot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2019 20:14:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545819#M23909</guid>
      <dc:creator>ZachSvoboda</dc:creator>
      <dc:date>2019-08-22T20:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Calculator to add a character in a field in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545820#M23910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Zach,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The input values are in a Text field&lt;/LI&gt;&lt;LI&gt;There's only one period&lt;/LI&gt;&lt;LI&gt;You're always wanting to add a zero after the period&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the following should work for you in Field Calculator&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NewField=&lt;/P&gt;&lt;P&gt;addzero(!NumberBefore!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Block=&lt;/P&gt;&lt;P&gt;def addzero(inputString):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;beforePeriod = inputString.split(".")[0]&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;afterPeriod = inputString.split(".")[1]&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;concatenateAll = beforePeriod+".0"+afterPeriod&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;return concatenateAll&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a screenshot of the whole thing:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/457739_TestingResults.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if that works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rachel&lt;/P&gt;&lt;P&gt;Esri Support Services&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2019 20:30:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545820#M23910</guid>
      <dc:creator>rachelg_esri</dc:creator>
      <dc:date>2019-08-22T20:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Calculator to add a character in a field in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545821#M23911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Zach,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In theory, you could also just do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!NumberBefore!.replace(".",".0")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should just replace the period with a period and a zero. You should only have to put that in the top section and not need a Code Block, I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rachel&lt;/P&gt;&lt;P&gt;Esri Support Services&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2019 21:01:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545821#M23911</guid>
      <dc:creator>rachelg_esri</dc:creator>
      <dc:date>2019-08-22T21:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Calculator to add a character in a field in ArcPro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545822#M23912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Rachel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2019 21:12:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/using-field-calculator-to-add-a-character-in-a/m-p/545822#M23912</guid>
      <dc:creator>ZachSvoboda</dc:creator>
      <dc:date>2019-08-22T21:12:33Z</dc:date>
    </item>
  </channel>
</rss>

