<?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: Joining values of two fields in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322791#M25163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are calculating into a TEXT field, and on of the fields is an integer, try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str(!Corridor!) + str(!RM!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, let me know what type of fields Corridor, RM, and the field you are calculating to are.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Oct 2015 15:33:05 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2015-10-09T15:33:05Z</dc:date>
    <item>
      <title>Re: Joining values of two fields</title>
      <link>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322788#M25160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks that worked great..&amp;nbsp; I know I should post this in a new thread but was hoping for a quick answer.&amp;nbsp; I'm trying to join 2 fields.&amp;nbsp; the corridor field and the RM field.&amp;nbsp; I was thinking it would look something like this but cant seem to figure it out.&amp;nbsp; .join(!Corridor! + !RM!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 14:05:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322788#M25160</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-10-09T14:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Joining values of two fields</title>
      <link>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322789#M25161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can perform this in the field calculator.&amp;nbsp; Make sure you have 'Python' at the top of the field calculator checked and then the syntax would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!Corridor! + !RM!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 14:23:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322789#M25161</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-10-09T14:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Joining values of two fields</title>
      <link>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322790#M25162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that and it won’t work..  Not sure if it has something to do with it being a text field..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 15:07:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322790#M25162</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-10-09T15:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Joining values of two fields</title>
      <link>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322791#M25163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are calculating into a TEXT field, and on of the fields is an integer, try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str(!Corridor!) + str(!RM!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, let me know what type of fields Corridor, RM, and the field you are calculating to are.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 15:33:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322791#M25163</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-10-09T15:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Joining values of two fields</title>
      <link>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322792#M25164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or try this tip&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="130457" alt="Field_calculator_tip_01.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/130457_Field_calculator_tip_01.png" style="width: 400px; height: 200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 15:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322792#M25164</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-10-09T15:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Joining values of two fields</title>
      <link>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322793#M25165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked but it adds a .0 to the end of the RM..&amp;nbsp; I created the RM field as a short with 0 decimal places.&amp;nbsp; So it returned C000001E156.0.&amp;nbsp; The precision is set to 4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 15:54:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322793#M25165</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-10-09T15:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Joining values of two fields</title>
      <link>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322794#M25166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it..&amp;nbsp; Thanks for your help./.&amp;nbsp; Have a good weekend..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2015 19:09:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322794#M25166</guid>
      <dc:creator>TerryGustafson</dc:creator>
      <dc:date>2015-10-09T19:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Joining values of two fields</title>
      <link>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322795#M25167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I'm trying to join 2 fields.&amp;nbsp; the corridor field and the RM field. Calculate Field (PYTHON) str(!CORRIDOR!) + str(!RM!) &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; worked but it adds a .0 to the end of the RM..&amp;nbsp; I created the RM field as a short with 0 decimal places.&amp;nbsp; So it returned C000001E156.0.&amp;nbsp; The precision is set to 4&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Try this Calculate Field syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.CalculateField_management(tbl, field, 
&amp;nbsp;&amp;nbsp;&amp;nbsp; "{}{:.0f}".format(!CORRIDOR!, !RM!), "", "PYTHON_9.3")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:20:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-joining-values-of-two-fields/m-p/322795#M25167</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T15:20:23Z</dc:date>
    </item>
  </channel>
</rss>

