<?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: the sample code for Geoprocessing extract data cannot select layer in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/the-sample-code-for-geoprocessing-extract-data/m-p/480175#M5911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like there is a problem with the service. If you navigate to the REST endpoint for the&lt;STRONG&gt; &lt;A href="http://sampleserver4.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/Incident_Data_Extraction/GPServer/Extract%20Data%20Task" title="http://sampleserver4.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/Incident_Data_Extraction/GPServer/Extract%20Data%20Task" rel="nofollow noopener noreferrer" target="_blank"&gt;Extract Data Task (HomelandSecurity/Incident_Data_Extraction)&lt;/A&gt;&lt;/STRONG&gt; service you'll see that the ChoiceList is missing. As a result this is causing the logic on line 48 in the sample to return an empty string from the "Layers_to_Clip" parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code in .NET is working properly because the ListBox in the second steps displays properly and it leverages the same logic as the first step. I'd have to ask around to see if if someone can look into this from the server side. Until this is fixed you could supply the names of the layers for the parameter within the code or you could leverage one of your services.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;// Sets up UI choices from the extract data service information
private async void SetupUI()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; try
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var info = await _gpTask.GetTaskInfoAsync();


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; listLayers.ItemsSource = info.Parameters.First(p =&amp;gt; p.Name == "Layers_to_Clip").ChoiceList;


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comboFormat.ItemsSource = info.Parameters.First(p =&amp;gt; p.Name == "Feature_Format").ChoiceList;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (comboFormat.ItemsSource != null &amp;amp;&amp;amp; comboFormat.Items.Count &amp;gt; 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comboFormat.SelectedIndex = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(ex.Message, "Sample Error");
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:11:42 GMT</pubDate>
    <dc:creator>FreddieGibson</dc:creator>
    <dc:date>2021-12-11T21:11:42Z</dc:date>
    <item>
      <title>the sample code for Geoprocessing extract data cannot select layer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/the-sample-code-for-geoprocessing-extract-data/m-p/480174#M5910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i download the sample code for Geoprocessing extract data&lt;/P&gt;&lt;P&gt;when i run it i cannot select layer for extraction, the layers list are empty.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/138914_Capture.PNG" style="width: 620px; height: 305px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 08:25:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/the-sample-code-for-geoprocessing-extract-data/m-p/480174#M5910</guid>
      <dc:creator>faot</dc:creator>
      <dc:date>2015-11-05T08:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: the sample code for Geoprocessing extract data cannot select layer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/the-sample-code-for-geoprocessing-extract-data/m-p/480175#M5911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like there is a problem with the service. If you navigate to the REST endpoint for the&lt;STRONG&gt; &lt;A href="http://sampleserver4.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/Incident_Data_Extraction/GPServer/Extract%20Data%20Task" title="http://sampleserver4.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/Incident_Data_Extraction/GPServer/Extract%20Data%20Task" rel="nofollow noopener noreferrer" target="_blank"&gt;Extract Data Task (HomelandSecurity/Incident_Data_Extraction)&lt;/A&gt;&lt;/STRONG&gt; service you'll see that the ChoiceList is missing. As a result this is causing the logic on line 48 in the sample to return an empty string from the "Layers_to_Clip" parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code in .NET is working properly because the ListBox in the second steps displays properly and it leverages the same logic as the first step. I'd have to ask around to see if if someone can look into this from the server side. Until this is fixed you could supply the names of the layers for the parameter within the code or you could leverage one of your services.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;// Sets up UI choices from the extract data service information
private async void SetupUI()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; try
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var info = await _gpTask.GetTaskInfoAsync();


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; listLayers.ItemsSource = info.Parameters.First(p =&amp;gt; p.Name == "Layers_to_Clip").ChoiceList;


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comboFormat.ItemsSource = info.Parameters.First(p =&amp;gt; p.Name == "Feature_Format").ChoiceList;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (comboFormat.ItemsSource != null &amp;amp;&amp;amp; comboFormat.Items.Count &amp;gt; 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comboFormat.SelectedIndex = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(ex.Message, "Sample Error");
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:11:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/the-sample-code-for-geoprocessing-extract-data/m-p/480175#M5911</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2021-12-11T21:11:42Z</dc:date>
    </item>
  </channel>
</rss>

