<?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: Field mappings remove field on a joined layer in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90608#M7054</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/conversion/feature-class-to-feature-class.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/conversion/feature-class-to-feature-class.htm"&gt;Feature Class to Feature Class—Conversion toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;states&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; list-style-position: outside; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;To remove fields during processing, delete output fields from the &lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; font-family: &amp;amp;quot; avenir next w01&amp;amp;quot;,&amp;amp;quot;avenir next w00&amp;amp;quot;,&amp;amp;quot;avenir next&amp;amp;quot;,&amp;amp;quot;avenir&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Field Map&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; list-style-position: outside; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;. This will not affect the input.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Are you saying this isn't working?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Apr 2019 12:18:20 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2019-04-10T12:18:20Z</dc:date>
    <item>
      <title>Field mappings remove field on a joined layer</title>
      <link>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90607#M7053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you remove a field on a joined layer? I am trying to remove some fields before exporting the dataset, but it won't allow me to do so. The fields I am attempting to remove are the joined fields. The only work around I have to this would be to create a selection on the joined layer that selects all the records, remove the join, then export the data. I cannot use Join Field because this should technically be an "invisible" join - I am only joining the tables because I need to filter the data before exporting as the original data are related tables; I don't actually need any of the joined fields in the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;mgmtJoin &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddJoin_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tractLyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'MgmtTractID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; MgmtTractAttrbTV&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'MgmtTractID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'KEEP_COMMON'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

fieldmappings &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FieldMappings&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#This is the target feature class of the join. I joined a table to this feature class.&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;addTable&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tractFC&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_OBJECTID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_MgmtTractID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_FocalRefID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_StateID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_VegMgmtPractice"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_Herbicide"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_MonthTreated"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_YearTreated"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_ImplementedBy"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_FundedBy"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_FarmBillCode"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_Comments"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_Area_Acres"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_DateAdded"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_Contract_Number"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_CLU_Number"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureClassToFeatureClass_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tractLyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; exportPath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MgmtTracts"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; "&lt;SPAN class="comment token"&gt;#", fieldmappings)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RemoveJoin_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tractLyr&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:28:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90607#M7053</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2021-12-10T23:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Field mappings remove field on a joined layer</title>
      <link>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90608#M7054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/conversion/feature-class-to-feature-class.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/conversion/feature-class-to-feature-class.htm"&gt;Feature Class to Feature Class—Conversion toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;states&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; list-style-position: outside; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;To remove fields during processing, delete output fields from the &lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; font-family: &amp;amp;quot; avenir next w01&amp;amp;quot;,&amp;amp;quot;avenir next w00&amp;amp;quot;,&amp;amp;quot;avenir next&amp;amp;quot;,&amp;amp;quot;avenir&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Field Map&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; list-style-position: outside; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;. This will not affect the input.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Are you saying this isn't working?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 12:18:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90608#M7054</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-04-10T12:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Field mappings remove field on a joined layer</title>
      <link>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90609#M7055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct. The output of the join table currently looks like this (all the fields I'm trying to remove are there, I just cut it off cause it's long):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="441679" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/441679_Capture.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to remove all those fields with the MgmtTractAttrb prefix. To do that, you first have to create a fieldmappings object. Then add the table you want to delete things from to that object. Then find and delete the field map (after you add the table to the fieldmappings object, each field in that table is automatically a field map object).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table must be a feature class or table view, not a feature layer. I have tried using a feature layer and while the script runs, none of the fields get deleted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 13:29:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90609#M7055</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2019-04-10T13:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Field mappings remove field on a joined layer</title>
      <link>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90610#M7056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I just didn't see the section where you are deleting the fields in your code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 13:41:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90610#M7056</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-04-10T13:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field mappings remove field on a joined layer</title>
      <link>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90611#M7057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;fieldmappings.removeFieldMap is supposed to delete the fields unless I am mistaken. Looking at the documentation though, this seems contradictory. Does it change the input features or not?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="color: #4c4c4c; background-color: #ffffff; margin-bottom: 1.55rem;"&gt;The&amp;nbsp;&lt;SPAN class=""&gt;Field Map&lt;/SPAN&gt;&amp;nbsp;parameter&lt;STRONG&gt; controls how the input fields in the&amp;nbsp;&lt;SPAN class=""&gt;Input Features&lt;/SPAN&gt;&amp;nbsp;will be written to the&amp;nbsp;&lt;SPAN class=""&gt;Output Features&lt;/SPAN&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;UL style="color: #4c4c4c; background-color: #ffffff; font-size: 15.9375px; margin-left: 0.775rem;"&gt;&lt;LI style="margin: 0.3875rem 0px 0.3875rem 1.5rem;"&gt;To remove fields during processing, delete output fields from the&lt;SPAN class=""&gt;Field Map&lt;/SPAN&gt;. &lt;STRONG&gt;This will not affect the input.&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bolded statements completely contradict each other...&lt;/P&gt;&lt;P&gt;For what it's worth, when I do this in the GUI in Desktop, the tool does what it's supposed to do and removes all the fields I want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2019 14:03:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90611#M7057</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2019-04-10T14:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Field mappings remove field on a joined layer</title>
      <link>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90612#M7058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alright, I lied; you can use fieldmappings on layers and not just feature classes. I swear I tried this before and it didn't work, but it's working now, so I must have done something wrong the first time. The problem with my original code posted above is that my tractFC doesn't actually have the joined fields, just the original fields, so when I added the feature class table to the fieldmappings object, the only fields I was trying to remove didn't exist. I changed it to my layer and it started working. Final code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddJoin_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tractLyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'MgmtTractID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; MgmtTractAttrbTV&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'MgmtTractID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'KEEP_COMMON'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

fieldmappings &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FieldMappings&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;addTable&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tractLyr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_OBJECTID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_MgmtTractID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_FocalRefID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_StateID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_VegMgmtPractice"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_Herbicide"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_MonthTreated"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_YearTreated"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_ImplementedBy"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_FundedBy"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_FarmBillCode"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_Comments"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_Area_Acres"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_DateAdded"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_Contract_Number"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;removeFieldMap&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fieldmappings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;findFieldMapIndex&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"MgmtTractAttrb_CLU_Number"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureClassToFeatureClass_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tractLyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; exportPath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MgmtTracts"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; "&lt;SPAN class="comment token"&gt;#", fieldmappings)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RemoveJoin_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tractLyr&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:28:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/field-mappings-remove-field-on-a-joined-layer/m-p/90612#M7058</guid>
      <dc:creator>MKF62</dc:creator>
      <dc:date>2021-12-10T23:28:07Z</dc:date>
    </item>
  </channel>
</rss>

