<?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 Syntax for Delete Field geoprocessing tool in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/syntax-for-delete-field-geoprocessing-tool/m-p/865880#M4938</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the syntax for deleting multiple fields programmatically? For instance, to add fields, it is&lt;/P&gt;&lt;P&gt;List&amp;lt;object&amp;gt; args = new List&amp;lt;Object&amp;gt; { path, FieldNames};&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; IGPResult res = await Georprocessing.ExecuteToolAsync("management.AddFields", Geoprocessing.MakeValueArray(args.ToArray()));&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried DeleteFields with the same Fields and it fails and have not been able to find the syntax for it in searching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Susan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Sep 2019 14:50:41 GMT</pubDate>
    <dc:creator>SusanFarley</dc:creator>
    <dc:date>2019-09-23T14:50:41Z</dc:date>
    <item>
      <title>Syntax for Delete Field geoprocessing tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/syntax-for-delete-field-geoprocessing-tool/m-p/865880#M4938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the syntax for deleting multiple fields programmatically? For instance, to add fields, it is&lt;/P&gt;&lt;P&gt;List&amp;lt;object&amp;gt; args = new List&amp;lt;Object&amp;gt; { path, FieldNames};&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; IGPResult res = await Georprocessing.ExecuteToolAsync("management.AddFields", Geoprocessing.MakeValueArray(args.ToArray()));&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried DeleteFields with the same Fields and it fails and have not been able to find the syntax for it in searching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Susan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2019 14:50:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/syntax-for-delete-field-geoprocessing-tool/m-p/865880#M4938</guid>
      <dc:creator>SusanFarley</dc:creator>
      <dc:date>2019-09-23T14:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for Delete Field geoprocessing tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/syntax-for-delete-field-geoprocessing-tool/m-p/865881#M4939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Susan,&lt;/P&gt;&lt;P&gt;I am not really sure that DeleteFields tool exists. DeleteField - yes. Try delete one by one field at first.&lt;/P&gt;&lt;P&gt;Next question is the structure of your FieldNames variable. If you use the same FieldNames variable for delete then it will not work, because for adding field you need more than just field name (type, length and etc.). For deleting it is enough only field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have just tested arcpy script where y and x is table field names:&lt;/P&gt;&lt;P&gt;arcpy.management.DeleteField('mytable', "y;x")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2019 06:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/syntax-for-delete-field-geoprocessing-tool/m-p/865881#M4939</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-09-26T06:56:01Z</dc:date>
    </item>
  </channel>
</rss>

