<?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 Using a Joins with Field Mapping in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-a-joins-with-field-mapping/m-p/564380#M44174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So this is what I want to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;I have a feature class (A) which I want to copy into another existing, empty feature class (B). Don't ask why; I just do.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;B has coded domains which define the codes for certain attribute values from A.&lt;/LI&gt;&lt;BR /&gt;For example, A has a attribute value of "California" which gets changed to a attribute code of "CA" in B.&lt;BR /&gt;&lt;LI&gt;So when I copy features from A to B, I want to remap the attributes: California -&amp;gt; CA.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;Seems simple enough. &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;(For those like me who better understand AML and coverages, I would create a relate to a LUT and then calc B.StateCode = A.relate//State&amp;nbsp; - not syntactically correct of course.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can unload a domain to a table using &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;DomainToTable_management &lt;/SPAN&gt;&lt;SPAN&gt;and then create a join from A to that table. Can I then use this as an input field for a FieldMap ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fldMap_IAF_ID = arcpy.FieldMap()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fldMap_IAF_ID.addInputField(inLayer, &lt;/SPAN&gt;&lt;STRONG&gt;JoinedTable.JoinedField&lt;/STRONG&gt;&lt;SPAN&gt;)[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From what I've tried it seems not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or am I going about the the entirely wrong way? Do I have to use an intermediate feature class and, if so, I still have the problem of updating a field in that based on the join.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Aug 2011 05:26:58 GMT</pubDate>
    <dc:creator>MalcolmParnell2</dc:creator>
    <dc:date>2011-08-24T05:26:58Z</dc:date>
    <item>
      <title>Using a Joins with Field Mapping</title>
      <link>https://community.esri.com/t5/python-questions/using-a-joins-with-field-mapping/m-p/564380#M44174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So this is what I want to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;I have a feature class (A) which I want to copy into another existing, empty feature class (B). Don't ask why; I just do.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;B has coded domains which define the codes for certain attribute values from A.&lt;/LI&gt;&lt;BR /&gt;For example, A has a attribute value of "California" which gets changed to a attribute code of "CA" in B.&lt;BR /&gt;&lt;LI&gt;So when I copy features from A to B, I want to remap the attributes: California -&amp;gt; CA.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;Seems simple enough. &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;(For those like me who better understand AML and coverages, I would create a relate to a LUT and then calc B.StateCode = A.relate//State&amp;nbsp; - not syntactically correct of course.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can unload a domain to a table using &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;DomainToTable_management &lt;/SPAN&gt;&lt;SPAN&gt;and then create a join from A to that table. Can I then use this as an input field for a FieldMap ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fldMap_IAF_ID = arcpy.FieldMap()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fldMap_IAF_ID.addInputField(inLayer, &lt;/SPAN&gt;&lt;STRONG&gt;JoinedTable.JoinedField&lt;/STRONG&gt;&lt;SPAN&gt;)[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From what I've tried it seems not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or am I going about the the entirely wrong way? Do I have to use an intermediate feature class and, if so, I still have the problem of updating a field in that based on the join.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 05:26:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-a-joins-with-field-mapping/m-p/564380#M44174</guid>
      <dc:creator>MalcolmParnell2</dc:creator>
      <dc:date>2011-08-24T05:26:58Z</dc:date>
    </item>
  </channel>
</rss>

