<?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: copy joined field in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181164#M13920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Field names should be quoted with exclamation marks, not brackets in python. E.g. !my_field!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Feb 2011 04:51:23 GMT</pubDate>
    <dc:creator>NiklasNorrthon</dc:creator>
    <dc:date>2011-02-14T04:51:23Z</dc:date>
    <item>
      <title>copy joined field</title>
      <link>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181163#M13919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to copy a field from a joined table to feature class.&amp;nbsp; This is easily accomplished in ArcMap with the field calculator or in model builder.&amp;nbsp; However, I can't seem to get it working with Python.&amp;nbsp; Any help would be greatly appreciated.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.MakeFeatureLayer_management(sde_SDE_nuts0, sde_nuts0_view)

&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Join Summary Table to NUTS Poly
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(sde_nuts0_view, "NUTS", "sde_SDE_EU_CTY_SUM_view", "Country_Code_NUTS", "KEEP_COMMON")

&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Copy PotPUMTotal - PotPUMTotal field already exists
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(sde_SDE_nuts0, "PotPUMTotal", "[sde.SDE.EU_CTY_SUM_JSA_Test.SUM_PotPUMTotal]", "VB", "")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It errors with Error #999999?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 04:19:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181163#M13919</guid>
      <dc:creator>JesseAdams</dc:creator>
      <dc:date>2011-02-14T04:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: copy joined field</title>
      <link>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181164#M13920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Field names should be quoted with exclamation marks, not brackets in python. E.g. !my_field!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 04:51:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181164#M13920</guid>
      <dc:creator>NiklasNorrthon</dc:creator>
      <dc:date>2011-02-14T04:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: copy joined field</title>
      <link>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181165#M13921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good point.&amp;nbsp; Rookie error.&amp;nbsp; However, now I receive a "ERROR 000539: Invalid field sde.SDE.EU_CTY_SUM_JSA_Test.SUM_PotPUMTotal" error.&amp;nbsp; Here is the line I'm using now for copying the field from the joined table:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.CalculateField_management(sde_SDE_nuts0, "PotPUMTotal", "!sde.SDE.EU_CTY_SUM_JSA_Test.SUM_PotPUMTotal!", "Python", "")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I don't use the table name in front of the field name I get the same error.&amp;nbsp; Any suggestions would be great.&amp;nbsp; Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 11:41:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181165#M13921</guid>
      <dc:creator>JesseAdams</dc:creator>
      <dc:date>2011-02-14T11:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: copy joined field</title>
      <link>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181166#M13922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try the arcpy.ListFields() function to see how it is spelled.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 12:16:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181166#M13922</guid>
      <dc:creator>NiklasNorrthon</dc:creator>
      <dc:date>2011-02-14T12:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: copy joined field</title>
      <link>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181167#M13923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply.&amp;nbsp; I copied the name directly from the ListFields() function output.&amp;nbsp; I'll try again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 12:22:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-joined-field/m-p/181167#M13923</guid>
      <dc:creator>JesseAdams</dc:creator>
      <dc:date>2011-02-14T12:22:08Z</dc:date>
    </item>
  </channel>
</rss>

