<?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: Bug in Geoprocessing.ExecuteToolAsync(&amp;quot;Append&amp;quot;) when using field mapping / Shapefile in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1090704#M7053</link>
    <description>&lt;P&gt;And what exaclty is the difference (compared to mine?)&lt;/P&gt;</description>
    <pubDate>Fri, 20 Aug 2021 06:09:08 GMT</pubDate>
    <dc:creator>ole1986</dc:creator>
    <dc:date>2021-08-20T06:09:08Z</dc:date>
    <item>
      <title>Bug in Geoprocessing.ExecuteToolAsync("Append") when using field mapping / Shapefile</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1084386#M6962</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Mapped Field does not get filled with content from source Shapefile&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Situation&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I do have a shapefile containing the following columns&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;FID&lt;/TD&gt;&lt;TD width="25%"&gt;Shape&lt;/TD&gt;&lt;TD width="25%"&gt;OID_&lt;/TD&gt;&lt;TD width="25%"&gt;Title&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;This Shapefile needs to be converted into an existing FeatureClass (with different columns) located inside the fgdb named "ExistingFeatureClass" containing the following columns&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;OBJECTID&lt;/TD&gt;&lt;TD width="25%"&gt;Shape&lt;/TD&gt;&lt;TD width="25%"&gt;OID_&lt;/TD&gt;&lt;TD width="25%"&gt;Name&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;So the main goal is to convert and fill the "Name" field with its content from "Title" located in the Shapefile.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The below code ALWAYS result into "&amp;lt;Null&amp;gt;" for the "Name" column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var Environments = Geoprocessing.MakeEnvironmentArray(overwriteoutput: true);
var ToolPath = "Append";
var ShapefilePath = "D:\\PathToShapefile\\shapefile.shp";
var FieldMappings = "OID_ \"OID_\" true true false 4 Long 0 0,First,#,D:\\PathToShapefile\\shapefile.shp,OID_,-1,-1;Name \"Name\" true true false 254 Text 0 0,First,#,D:\\PathToShapefile\\shapefile.shp,Title,0,254";

var Parameters = Geoprocessing.MakeValueArray(ShapeFilePath, "ExistingFeatureClass", "NO_TEST", FieldMappings);
await Geoprocessing.ExecuteToolAsync(ToolPath, Parameters, Environments);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While running the code with indentical Parameters using the Dialog (&lt;STRONG&gt;see below&lt;/STRONG&gt;) all fields are correctly mapped and only a "Run" is pending for the success&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Result = await Geoprocessing.OpenToolDialogAsync(ToolPath, Parameters, Environments);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Any ideas on how to resolve this? Is this a BUG?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Product Information&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ArcGIS Pro 2.8.1&lt;/P&gt;&lt;P&gt;using&amp;nbsp;Esri.ArcGISPro.Extensions 2.8.0.29751&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 13:19:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1084386#M6962</guid>
      <dc:creator>ole1986</dc:creator>
      <dc:date>2021-07-30T13:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Geoprocessing.ExecuteToolAsync("Append") when using field mapping / Shapefile</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1090645#M7052</link>
      <description>&lt;P&gt;I used the following snippet with different schemas (I attached my sample ArcGIS Pro project file):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;protected override async void OnClick()
{
  try
  {
	var environments = Geoprocessing.MakeEnvironmentArray(overwriteoutput: true);
	var toolPath = "management.Append";
	var shapefilePath = @"C:\Users\wolf2125\Documents\ArcGIS\Projects\GPTestAppendTool\ShapeFile\base_state.shp";
	var shapefileName = System.IO.Path.GetFileNameWithoutExtension(shapefilePath);
	var destintationTable = "BaseState";
	var fields = new string[] {
	  $@"AREA ""AREA"" true false false 8 Double 0 0,First,#,{shapefilePath},AREA,-1,-1",
	  $@"PERIMETER ""PERIMETER"" true false false 8 Double 0 0,First,#,{shapefilePath},PERIMETER,-1,-1",
	  $@"BASEMAP_ ""BASEMAP_"" true false false 8 Double 0 0,First,#,{shapefilePath},BASEMAP_,-1,-1",
	  $@"BASEMAP_ID ""BASEMAP_ID"" true false false 8 Double 0 0,First,#,{shapefilePath},BASEMAP_ID,-1,-1",
	  $@"Test ""TYPE"" true false false 10 Text 0 0,First,#,{shapefileName},TYPE,0,10" };
	var fieldMap = string.Join(";", fields);
	var Parameters = Geoprocessing.MakeValueArray(shapefileName, destintationTable, "NO_TEST", fieldMap, "", "");
	var gpResult = await Geoprocessing.ExecuteToolAsync(toolPath, Parameters, environments);
	Geoprocessing.ShowMessageBox(gpResult.Messages, "GP Messages", gpResult.IsFailed ? GPMessageBoxStyle.Error : GPMessageBoxStyle.Default);
  }
  catch (Exception ex)
  {
	MessageBox.Show($@"Error: {ex}");
  }
}&lt;/LI-CODE&gt;&lt;P&gt;Actually I just noticed that I had changed the alias name for the "Test" column in the destination table from "Type" to "Test" but I forgot to make the change in the code snippet.&amp;nbsp; However, i seems that the alias name doesn't matter for this tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 22:25:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1090645#M7052</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-08-19T22:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Geoprocessing.ExecuteToolAsync("Append") when using field mapping / Shapefile</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1090704#M7053</link>
      <description>&lt;P&gt;And what exaclty is the difference (compared to mine?)&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 06:09:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1090704#M7053</guid>
      <dc:creator>ole1986</dc:creator>
      <dc:date>2021-08-20T06:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Geoprocessing.ExecuteToolAsync("Append") when using field mapping / Shapefile</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1090924#M7057</link>
      <description>&lt;P&gt;When I played around with my sample to find the difference I was not able to get the 'mapped' field populated anymore.&amp;nbsp; I passed the sample on to the GeoProcessing project engineer, i really can't see anything wrong with the code.&amp;nbsp; Also, I think the GP tool should report a warning or error if the 'mapped' field cannot be populated.&amp;nbsp; I will let you know if we find the cause of this issue.&lt;/P&gt;&lt;P&gt;Thanks for you patience and reporting this issue.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 19:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1090924#M7057</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-08-20T19:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Geoprocessing.ExecuteToolAsync("Append") when using field mapping / Shapefile</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1097758#M7119</link>
      <description>&lt;P&gt;Could you please share your data (at least schema)? Or, you can try Wolf's way:&lt;/P&gt;&lt;P&gt;"AREA ""AREA"" true false false 8 Double 0 0,First,#,{shapefilePath},AREA,-1,-1"&lt;/P&gt;&lt;P&gt;Create a variable named shapefilePath and the path of your data to it. Then try and let us know. You can email me at nahmed@esri.com&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 19:06:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1097758#M7119</guid>
      <dc:creator>gpnobbir</dc:creator>
      <dc:date>2021-09-13T19:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in Geoprocessing.ExecuteToolAsync("Append") when using field mapping / Shapefile</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1097760#M7120</link>
      <description>&lt;P&gt;Could you please share your data? We'd like to try with your data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 19:13:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/bug-in-geoprocessing-executetoolasync-quot-append/m-p/1097760#M7120</guid>
      <dc:creator>gpnobbir</dc:creator>
      <dc:date>2021-09-13T19:13:08Z</dc:date>
    </item>
  </channel>
</rss>

