<?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: esri/rest/geoprocessor - jobInfo.fetchResultData(&amp;lt;parameter name&amp;gt;) gives empty FeatureSet in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/esri-rest-geoprocessor-jobinfo-fetchresultdata-lt/m-p/1143953#M14701</link>
    <description>&lt;P&gt;I solved this problem, in&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript-questions/api-4-22-jobinfo-fetchresultdata-gives-result-with/td-p/1141536" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-api-for-javascript-questions/api-4-22-jobinfo-fetchresultdata-gives-result-with/td-p/1141536&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Feb 2022 08:06:54 GMT</pubDate>
    <dc:creator>MichaelLev</dc:creator>
    <dc:date>2022-02-15T08:06:54Z</dc:date>
    <item>
      <title>esri/rest/geoprocessor - jobInfo.fetchResultData(&lt;parameter name&gt;) gives empty FeatureSet</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/esri-rest-geoprocessor-jobinfo-fetchresultdata-lt/m-p/1138806#M14687</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I use WebAppBuilder 2.22 to develop 3D web apps with custom widgets (esri js API 4.22) for our portal.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I use python peoprocessing tool and the 'esri/rest/geoprocessor' service to create in the portal a shape file that contains points, polygons and polylines feature layers.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I succeeded to cause the server to display the shapefile in the web app (see in the code),&lt;BR /&gt;b&lt;/SPAN&gt;&lt;SPAN&gt;ut for some reasons this is &lt;STRONG&gt;not&lt;/STRONG&gt; what I need...&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;What I really need&lt;/STRONG&gt; is to retrieve the feature layers themselves (the points layer, the polygon layer, the polyline layer etc.) and insert them into the scene by &lt;STRONG&gt;my&lt;/STRONG&gt; code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But, "jobInfo.fetchResultData" gives somehoe an &lt;STRONG&gt;empty&lt;/STRONG&gt; featureset for all the shapefile layers...&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I need help to fix this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The skeleton of my code is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;geoprocessor.submitJob(gpUrl, gpParams)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; .then((jobInfo) =&amp;gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; jobInfo.waitForJobCompletion().then((jobInfo2) =&amp;gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#339966"&gt;//this works to display the shapefle on the 3D scene, .&lt;BR /&gt;&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#339966"&gt;//But for some reasons this is &lt;STRONG&gt;not&lt;/STRONG&gt; what I need..&lt;/FONT&gt;.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;jobInfo.fetchResultMapImageLayer(jobInfo.jobId)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.then(function (shapefile) {&lt;BR /&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;sceneView.map.add(shapefile);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;//This is what I need... to get the layers themselves&lt;BR /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;//I repeat this for points and for polylines&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;jobInfo2.fetchResultData("polygonFC")&lt;BR /&gt;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.then(function (result) {&lt;BR /&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; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (result.dataType == "feature-record-set-layer") {&lt;BR /&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;let featureSet = result.value;&lt;BR /&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;FONT color="#339966"&gt;&lt;STRONG&gt;//&lt;FONT color="#FF0000"&gt;but here, featureSet is an empty array...&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&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; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;BR /&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;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 12:43:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/esri-rest-geoprocessor-jobinfo-fetchresultdata-lt/m-p/1138806#M14687</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2022-01-31T12:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: esri/rest/geoprocessor - jobInfo.fetchResultData(&lt;parameter name&gt;) gives empty FeatureSet</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/esri-rest-geoprocessor-jobinfo-fetchresultdata-lt/m-p/1143953#M14701</link>
      <description>&lt;P&gt;I solved this problem, in&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript-questions/api-4-22-jobinfo-fetchresultdata-gives-result-with/td-p/1141536" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-api-for-javascript-questions/api-4-22-jobinfo-fetchresultdata-gives-result-with/td-p/1141536&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 08:06:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/esri-rest-geoprocessor-jobinfo-fetchresultdata-lt/m-p/1143953#M14701</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2022-02-15T08:06:54Z</dc:date>
    </item>
  </channel>
</rss>

