<?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 Return value from Python-Tool to geoprocessor.getResultData in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/return-value-from-python-tool-to-geoprocessor/m-p/302659#M1492</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;A js-api-script is calling an asynchronous ArcGis-Server-Geoprocessing-Service:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gp = new Geoprocessor(&amp;lt;url&amp;gt;/GPServer/...");&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;gp.submitJob(params, completeCallback, statusCallback, jobFailed);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Geoprocessing-Service executes the Tool "Calculate Value", which contains a Python script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the way to send the return-value (String) of the Python-Script back to the completeCallback-Function on Client?&lt;/P&gt;&lt;P&gt;gp.getResultData seems to be the wrong way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is there any other posibility to get Access to the return-value in the js ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a6a6a;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Aug 2017 12:31:44 GMT</pubDate>
    <dc:creator>ChristianPagel1</dc:creator>
    <dc:date>2017-08-09T12:31:44Z</dc:date>
    <item>
      <title>Return value from Python-Tool to geoprocessor.getResultData</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/return-value-from-python-tool-to-geoprocessor/m-p/302659#M1492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;A js-api-script is calling an asynchronous ArcGis-Server-Geoprocessing-Service:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gp = new Geoprocessor(&amp;lt;url&amp;gt;/GPServer/...");&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;gp.submitJob(params, completeCallback, statusCallback, jobFailed);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Geoprocessing-Service executes the Tool "Calculate Value", which contains a Python script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the way to send the return-value (String) of the Python-Script back to the completeCallback-Function on Client?&lt;/P&gt;&lt;P&gt;gp.getResultData seems to be the wrong way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is there any other posibility to get Access to the return-value in the js ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #6a6a6a;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 12:31:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/return-value-from-python-tool-to-geoprocessor/m-p/302659#M1492</guid>
      <dc:creator>ChristianPagel1</dc:creator>
      <dc:date>2017-08-09T12:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Return value from Python-Tool to geoprocessor.getResultData</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/return-value-from-python-tool-to-geoprocessor/m-p/302660#M1493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You probably have the answer already, but for those who have run into this problem, before you publish the ArcPy script as a geoprocessing service, in the parameter section where you set up the different data values as input, you also need to add parameters and set them up as outputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have values that you want to pass them to the geoprocessor tax in your web app, set the output parameters using arcpy.SetParameterAsText(index, value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you publish the geoprocessing service, the outputs will be saved as part of the geoprocessing job which can then be accessed by .getResultData().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 17:00:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/return-value-from-python-tool-to-geoprocessor/m-p/302660#M1493</guid>
      <dc:creator>AllenHuang</dc:creator>
      <dc:date>2019-09-04T17:00:18Z</dc:date>
    </item>
  </channel>
</rss>

