<?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 How to copy some fields from one feature class to an existing fc in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698703#M54174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to copy some fields from one shapefile to another existing one, preferably using Arcpy.&amp;nbsp;Below is my code that checks for common fields between two shapefiles. Can I use this and add code to copy the fields that are not already in the destination shapefile from the original? What function will do that for me? I do not want data to transfer over--just the fields. Thank you!&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;&amp;gt;&amp;gt;&amp;gt;#FIELDS&amp;nbsp;is the&amp;nbsp;list of fields from the shapefile to copy from&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;#FIELDS2 is the list of fields already in the shapefile to copy to&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;fields = arcpy.ListFields("G:/Working Folder/Backup.gdb/PubData_RoadCenterlines")&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... fields2 = arcpy.ListFields(r"G:\Data\External\Fairfield_County\Dupage_Centerlines_Web_Mercator_1984.shp")&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... namelist = []&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... namelist2 = []&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... x = 0&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... y = 0&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... &lt;/SPAN&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; field &lt;/SPAN&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; fields:&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#populate&amp;nbsp;NAMELIST[] with FIELDS&amp;nbsp;&lt;/SPAN&gt;&lt;UL&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;namelist.append(field.name)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp; #check the to shapefile for fields it already has and are common with the from shapefile&lt;/SPAN&gt;&lt;UL&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; field2 &lt;/SPAN&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; fields2:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; namelist2.append(field2.name)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; namelist2&lt;X&gt; == namelist&lt;Y&gt;:&lt;/Y&gt;&lt;/X&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; namelist&lt;Y&gt; + "is common between the two shapefiles"&lt;/Y&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;x+=1&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y+=1&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Apr 2019 16:16:22 GMT</pubDate>
    <dc:creator>DougWolfinger2</dc:creator>
    <dc:date>2019-04-25T16:16:22Z</dc:date>
    <item>
      <title>How to copy some fields from one feature class to an existing fc</title>
      <link>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698703#M54174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to copy some fields from one shapefile to another existing one, preferably using Arcpy.&amp;nbsp;Below is my code that checks for common fields between two shapefiles. Can I use this and add code to copy the fields that are not already in the destination shapefile from the original? What function will do that for me? I do not want data to transfer over--just the fields. Thank you!&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;&amp;gt;&amp;gt;&amp;gt;#FIELDS&amp;nbsp;is the&amp;nbsp;list of fields from the shapefile to copy from&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;#FIELDS2 is the list of fields already in the shapefile to copy to&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;fields = arcpy.ListFields("G:/Working Folder/Backup.gdb/PubData_RoadCenterlines")&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... fields2 = arcpy.ListFields(r"G:\Data\External\Fairfield_County\Dupage_Centerlines_Web_Mercator_1984.shp")&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... namelist = []&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... namelist2 = []&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... x = 0&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... y = 0&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;... &lt;/SPAN&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; field &lt;/SPAN&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; fields:&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#populate&amp;nbsp;NAMELIST[] with FIELDS&amp;nbsp;&lt;/SPAN&gt;&lt;UL&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;namelist.append(field.name)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp; #check the to shapefile for fields it already has and are common with the from shapefile&lt;/SPAN&gt;&lt;UL&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; field2 &lt;/SPAN&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; fields2:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; namelist2.append(field2.name)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; namelist2&lt;X&gt; == namelist&lt;Y&gt;:&lt;/Y&gt;&lt;/X&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #004da8; font-size: 12pt;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt; namelist&lt;Y&gt; + "is common between the two shapefiles"&lt;/Y&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;x+=1&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="color: black; font-size: 12pt;"&gt;&lt;SPAN style="color: black; font-size: 12pt;"&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y+=1&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2019 16:16:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698703#M54174</guid>
      <dc:creator>DougWolfinger2</dc:creator>
      <dc:date>2019-04-25T16:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy some fields from one feature class to an existing fc</title>
      <link>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698704#M54175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Doug&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;shp01 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\tmp\New_Shapefile01.shp'&lt;/SPAN&gt;
shp02 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\tmp\New_Shapefile02.shp'&lt;/SPAN&gt;

fieldsShp01 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListFields&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;shp01&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldsShp02 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListFields&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;shp02&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

newFields &lt;SPAN class="operator 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="keyword token"&gt;for&lt;/SPAN&gt; field01 &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fieldsShp01&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
	exists &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;
	&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; field02 &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fieldsShp02&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
		&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;field01&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; field02&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; field01&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; field02&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; field01&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; field02&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
			exists &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#			print("The {0} field with a type of {1} and a length of {2} exists in both shapefiles"&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#				.format(field01.name, field01.type, field01.length))&lt;/SPAN&gt;
	&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;exists &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#		print("The {0} field with a type of {1} and a length of {2} exists only in shp 01"&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#			.format(field01.name, field01.type, field01.length))&lt;/SPAN&gt;
		newFields&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;field01&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; field01&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; field01&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;		

&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; field &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; newFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;	
	arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddField_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;shp02&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; field&lt;SPAN class="punctuation 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="punctuation token"&gt;,&lt;/SPAN&gt; field&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="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; field&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&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;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NON_NULLABLE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"NON_REQUIRED"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
	&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"The {0} field with a type of {1} and a length of {2} was added to shp 02"&lt;/SPAN&gt;
		&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;field&lt;SPAN class="punctuation 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="punctuation token"&gt;,&lt;/SPAN&gt; field&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="punctuation token"&gt;,&lt;/SPAN&gt; field&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&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="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;/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;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;&lt;/P&gt;&lt;P&gt;For documentation on the&amp;nbsp;Add Field tool you can&amp;nbsp;navigate&amp;nbsp;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.6/tools/data-management-toolbox/add-field.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:24:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698704#M54175</guid>
      <dc:creator>leomonterol</dc:creator>
      <dc:date>2021-12-12T05:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy some fields from one feature class to an existing fc</title>
      <link>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698705#M54176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Leo,&lt;/P&gt;&lt;P&gt;Thank you so much. I'll take a close look at this over the weekend. But for now it is throwing an exception at the AddField_management() line:&lt;/P&gt;&lt;P&gt;... &lt;SPAN style="color: #004da8;"&gt;for&lt;/SPAN&gt; field &lt;SPAN style="color: #004da8;"&gt;in&lt;/SPAN&gt; newFields:&lt;/P&gt;&lt;P&gt;... arcpy.AddField_management(shp02, field[0], field[1], "", "", field[2], "", "NON_NULLABLE","NON_REQUIRED","")&lt;/P&gt;&lt;P&gt;... &lt;SPAN style="color: #004da8;"&gt;print&lt;/SPAN&gt;("The {0} field with a type of {1} and a length of {2} was added to shp 02"&lt;/P&gt;&lt;P&gt;... .format(field[0], field[1], field[2]))&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Runtime error Traceback (most recent call last): File "&amp;lt;string&amp;gt;", line 22, in &amp;lt;module&amp;gt; File "j:\apps\arcgis\desktop10.4\arcpy\arcpy\management.py", line 3149, in AddField raise e ExecuteError: ERROR 000800: The value is not a member of TEXT | FLOAT | DOUBLE | SHORT | LONG | DATE | BLOB | RASTER | GUID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I removed field[0] and field[1], then got this error:&lt;/P&gt;&lt;P&gt;Runtime error Traceback (most recent call last): File "&amp;lt;string&amp;gt;", line 22, in &amp;lt;module&amp;gt; File "j:\apps\arcgis\desktop10.4\arcpy\arcpy\management.py", line 3149, in AddField raise e ExecuteError: ERROR 000310: The Field name must not start with a number&lt;/P&gt;&lt;P&gt;There are no field names that start with a number in the source layer. Like I said, I'll work with this later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Again!&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2019 19:57:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698705#M54176</guid>
      <dc:creator>DougWolfinger2</dc:creator>
      <dc:date>2019-04-26T19:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy some fields from one feature class to an existing fc</title>
      <link>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698706#M54177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try moving the print statement that you use right after the add field function up so that it prints what is supposed to be added. I think that will give you the info you need to solve the problem. Based on the error you received I believe that your script is trying to add a field with an invalid type to the target shapefile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Micah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2019 20:19:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698706#M54177</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2019-04-26T20:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy some fields from one feature class to an existing fc</title>
      <link>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698707#M54178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Doug&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try Micah's suggestion (place print statement before &lt;SPAN style="background-color: #ffffff;"&gt;arcpy.AddField_management&lt;/SPAN&gt;) to see the properties (name, type, length) of the field you're trying to add.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2019 12:51:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698707#M54178</guid>
      <dc:creator>leomonterol</dc:creator>
      <dc:date>2019-04-29T12:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy some fields from one feature class to an existing fc</title>
      <link>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698708#M54179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally got a chance to get back into this and got it working. I moved the last print statement above the add field call :&lt;BR /&gt;... print("The {0} field with a type of {1} and a length of {2} was added to shp 02"&lt;BR /&gt;... .format(field[0], field[1], field[2])) &lt;BR /&gt;... arcpy.AddField_management(shp02, field[0], field[1], "", "", field[2], "", "NON_NULLABLE","NON_REQUIRED","")&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;.....&amp;nbsp;and got this error message:&amp;nbsp;... for field in newFields:&lt;BR /&gt;The OBJECTID field with a type of OID and a length of 4 was added to shp 02&lt;BR /&gt;Runtime error Traceback (most recent call last): File "&amp;lt;string&amp;gt;", line 24, in &amp;lt;module&amp;gt; File "j:\apps\arcgis\desktop10.4\arcpy\arcpy\management.py", line 3149, in AddField raise e ExecuteError: ERROR 000800: The value is not a member of TEXT | FLOAT | DOUBLE | SHORT | LONG | DATE | BLOB | RASTER | GUID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I added a nested IF to bypass the adding of OBJECTID because it looked like it balked at adding it. I suppose this is because every shp has a field like that by default.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if (exists == False):&lt;BR /&gt;... if (field01.name != 'OBJECTID'):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;newFields.append([field01.name, field01.type, field01.length])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for the assistance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2019 19:57:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698708#M54179</guid>
      <dc:creator>DougWolfinger2</dc:creator>
      <dc:date>2019-05-07T19:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy some fields from one feature class to an existing fc</title>
      <link>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698709#M54180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to hear it! Since sometimes OID fields have a name besides OBJECTID, an even more robust approach would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;field01&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'OID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy scripting, Doug.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2019 20:39:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-copy-some-fields-from-one-feature-class-to/m-p/698709#M54180</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2019-05-07T20:39:10Z</dc:date>
    </item>
  </channel>
</rss>

