<?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 Pass a null result back to a dynamic map Service from a geoprocessing task in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699644#M23176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Howzit All, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have created a Geoprocessing Service that creates a Heat Map using the Kernel Density Tool. The service works well, and quickly when a feature selection is given to it. However, the tool fails when the feature layer selection returns no records and a null Raster Layer is passed back to the AGS Dynamic Map Service Layer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Geoprocssing Overview: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- create a Feature Layer from a sql expression&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- generate Kernel Density Layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- set Layer into resulting Dynamic Map Service Layer as a Raster Layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The task fails when a null Raster Layer does not exist and is passed back to the out Layer using.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SetParameterAsText(6,outRaster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The task succeeds when the heatMap is created from &amp;gt; 1 features in the selection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Setting arcpy.SetSeverityLevel(0) ensures the task completes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the problem occurs at the map services level because the task completes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I pass a null Layer back to a Raster Layer in a AGS Dynmaic Map Service Layer from a Geoprocessing Result?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Susan&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;North South GIS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Auckland, New Zealand&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Oct 2012 05:23:08 GMT</pubDate>
    <dc:creator>SusanJones</dc:creator>
    <dc:date>2012-10-03T05:23:08Z</dc:date>
    <item>
      <title>Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699644#M23176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Howzit All, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have created a Geoprocessing Service that creates a Heat Map using the Kernel Density Tool. The service works well, and quickly when a feature selection is given to it. However, the tool fails when the feature layer selection returns no records and a null Raster Layer is passed back to the AGS Dynamic Map Service Layer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Geoprocssing Overview: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- create a Feature Layer from a sql expression&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- generate Kernel Density Layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- set Layer into resulting Dynamic Map Service Layer as a Raster Layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The task fails when a null Raster Layer does not exist and is passed back to the out Layer using.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SetParameterAsText(6,outRaster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The task succeeds when the heatMap is created from &amp;gt; 1 features in the selection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Setting arcpy.SetSeverityLevel(0) ensures the task completes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the problem occurs at the map services level because the task completes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I pass a null Layer back to a Raster Layer in a AGS Dynmaic Map Service Layer from a Geoprocessing Result?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Susan&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;North South GIS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Auckland, New Zealand&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 05:23:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699644#M23176</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-10-03T05:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699645#M23177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Susan, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can modify the code for output paramter so there is no result map service returning when the selections result is zero. Here are two options: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(1) If the selections result is zero, set the outputpath of the kernel density path to blank and do not execute the kernel density function. Also, set theoutput parameter as a derived output in the script tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code looks like &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy.sa import *&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;inputval = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;inputpts = r'c:\KernelDensity\data.gdb\Crime'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outputpts = os.path.join(arcpy.env.scratchGDB, "selectcr")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outraster = os.path.join(arcpy.env.scratchGDB, "KernelD_sele1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;query = "ID &amp;lt; " + inputval&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Select_analysis(inputpts&amp;nbsp; , outputpts, query)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;result = arcpy.GetCount_management(outputpts)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;count = int(result.getOutput(0))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if count == 0 :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddWarning("count = 0")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outraster = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outKDens = KernelDensity(outputpts, "NONE", 45, 1200, "SQUARE_KILOMETERS")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outKDens.save(outraster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SetParameter(1, outraster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(2) Set the output parameter only when the the selection result is zero. Then set the output paramter as optional in the script tool. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy.sa import *&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;inputval = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outraster = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;inputpts = r'c:\KernelDensity\data.gdb\Crime'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outputpts = os.path.join(arcpy.env.scratchGDB, "selectcr")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;query = "ID &amp;lt; " + inputval&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Select_analysis(inputpts&amp;nbsp; , outputpts, query)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;result = arcpy.GetCount_management(outputpts)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;count = int(result.getOutput(0))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(" The select count = " + str(count))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if count == 0:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddWarning("count = 0")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SetParameter(1, "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outKDens = KernelDensity(outputpts, "NONE", 45, 1200, "SQUARE_KILOMETERS")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outKDens.save(outraster)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 16:40:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699645#M23177</guid>
      <dc:creator>ShingLin</dc:creator>
      <dc:date>2012-10-04T16:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699646#M23178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for getting back about this one. I have tried passing back a null string. The tool completes by first setting the environment by arcpy.SetSeverityLevel(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#TODO: set Output&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage("***set The Output Layer")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if arcpy.GetCount_management("inFeatures1")&amp;gt;0:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("SETTING VALID RASTER")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SetParameter(6,outRaster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("SETTING INVALID RASTER")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SetParameter(6,"")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am attaching the attached message when we run from the REST Endpoint.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 21:38:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699646#M23178</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-10-04T21:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699647#M23179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please note that the output parameter must be optional or derived, then setting the path to empty will work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2012 19:51:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699647#M23179</guid>
      <dc:creator>ShingLin</dc:creator>
      <dc:date>2012-10-05T19:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699648#M23180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi and Thanks for this,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have been running with the derived output and then tried switching to the optional output with the same result. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no problem when the feature selection is greater than 0. The raster layer returns nice and beautifully into the dynamic map service layer at the conclusion of the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have noticed that the following statement does not fire&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#TODO: wont Fire&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if arcpy.GetCount_management(lyr)==0:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; arcpy.SetParameter(6,"")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; sys.exit(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, casting the parameter as a string will fire,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#TODO: will Fire&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if str(arcpy.GetCount_management(lyr))=="0":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; arcpy.SetParameter(6,"")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; sys.exit(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is probably another issue either with the syntax or the way the function is parsed through python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't get a chance to test this with ArcGIS Server 10.0, so cannot sayif this is new behaviour.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Susan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2012 21:20:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699648#M23180</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-10-05T21:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699649#M23181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What version of server are you using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My example is on 10.1 server. I have not tried previous version of server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 17:04:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699649#M23181</guid>
      <dc:creator>ShingLin</dc:creator>
      <dc:date>2012-10-08T17:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699650#M23182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We recently upgraded all the ArcGIS Infrastructure to ArcGIS 10.1 release. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure if the issue is in the scripting,but rather the way the parameter is parsed into the AGS Dynamic Map Service Layer which is giving problems.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 18:43:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699650#M23182</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-10-08T18:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699651#M23183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you share the data/script you wrote so i can verify where may go wrong? Or just copy the script that I sent to you? I did not get any fails with the script that I replied to you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 23:42:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699651#M23183</guid>
      <dc:creator>ShingLin</dc:creator>
      <dc:date>2012-10-08T23:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699652#M23184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Attached is the complete script. There is a toolbox which I have not attached becaus eit is probably not necessary. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;outRaster is a derived Raster Output Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We pass a load of comma separated strings in the beginning and spend a bit of time building up the sql expression for inFeatures1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for checking it out. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Susan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 20:11:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699652#M23184</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-10-10T20:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699653#M23185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When you run your service with the query set to zero, did you see your "***set The Null Output" wriiten out? If not, can you try the approach in the code that I posted regarding to get count see if you get the message?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 22:32:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699653#M23185</guid>
      <dc:creator>ShingLin</dc:creator>
      <dc:date>2012-10-12T22:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699654#M23186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just checked the arcpy.SetParameter(6,"") using your recommendations. The output still generates an invalid return value back to the AGS Dynamic Map Service Layer. Pretty sure that the Geoprocessing serivce is successfully execution as it fails after the task has finished.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: 0:00:02.254000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Completed script MEDKDInterpolatePOCwithparameters...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Succeeded at Wed Oct 17 16:45:28 2012 (Elapsed Time: 3.00 seconds)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Succeeded at Wed Oct 17 16:45:28 2012 (Elapsed Time: 3.00 seconds)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeError: Invalid return value:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 02:47:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699654#M23186</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-10-17T02:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699655#M23187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN style="text-decoration:underline;"&gt;Calling Script&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--start Here --&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(sqlQuery)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;outRaster=arcpy.env.scratchGDB+os.path.sep+"heatMap"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#outRaster=arcpy.GetParameterAsText(3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management(inFeatures,"inFeatures1",sqlQuery)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage("feature Count:"+str(arcpy.GetCount_management("inFeatures1")))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;descFeatures=arcpy.Describe("inFeatures1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;result=arcpy.GetCount_management("inFeatures1")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;count = int(result.getOutput(0))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.mask=descFeatures.extent&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(str(count))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#TODO: test For Selection&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if count==0:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Error")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SetParameter(6,"")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Continue")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #TODO: process Kerenl Density&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; processStart=datetime.datetime.now()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("***generate Kernel Density Surface")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.gp.KernelDensity_sa("inFeatures1", modelFld, outRaster, "", searchReadius, "SQUARE_MAP_UNITS")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(str(datetime.datetime.now()-processStart))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #TODO: check In License&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("***check In Spatial Analyst")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CheckInExtension("spatial")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #TODO: set Output&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("***set The Output Layer")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SetParameter(6,outRaster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration:underline;"&gt;Complete Messaging&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Job Messages:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Submitted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Executing...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Executing (MED_KDInterpolate_POC_withparameters): MEDKDInterpolatePOCwithparameters "Corinthian,Philip V" hok # # # Estimated_catch__gwt_ C:\Users\services\AppData\Local\Temp\med\medkdinterpolatepoc_demo_gpserver\je2f1a43da2ef49bc9585d464cf91e4c4\scratch\scratch.gdb\heatMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Start Time: Thu Oct 18 08:44:54 2012&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Executing (MEDKDInterpolatePOCwithparameters): MEDKDInterpolatePOCwithparameters "Corinthian,Philip V" hok # # # Estimated_catch__gwt_ C:\Users\services\AppData\Local\Temp\med\medkdinterpolatepoc_demo_gpserver\je2f1a43da2ef49bc9585d464cf91e4c4\scratch\scratch.gdb\heatMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Start Time: Thu Oct 18 08:44:54 2012&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Running script MEDKDInterpolatePOCwithparameters...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: *** Kernel Density Generator with Parameters ***&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: ***check Out Spatial Analyst&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: "Vessel_Name" IN ('Corinthian', 'Philip V') AND "Species" IN ('hok')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: feature Count:0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Error&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: completed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: 0:00:04.962000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Completed script MEDKDInterpolatePOCwithparameters...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Succeeded at Thu Oct 18 08:45:00 2012 (Elapsed Time: 6.00 seconds)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeInformative: Succeeded at Thu Oct 18 08:45:00 2012 (Elapsed Time: 6.00 seconds)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeError: Invalid return value: C:\Users\services\AppData\Local\Temp\med\medkdinterpolatepoc_demo_gpserver\je2f1a43da2ef49bc9585d464cf91e4c4\scratch\scratch.gdb\heatMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriJobMessageTypeError: Failed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 18:51:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699655#M23187</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-10-17T18:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699656#M23188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;perhaps the best workaround is to put some error trapping in to check for the failed task by the calling applicaton, in this case the javascript API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It doesn't appear the GP Dynamic Map services can handle a null return.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The tool works fine when it is not a Geoprocessing Service, even when a null output is returned. It fails with Geoprocessing Service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 20:43:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699656#M23188</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-10-17T20:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699657#M23189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Only run the kernel density function when the get count is greater than zero. The map service is generated based on the result of gp service. When there is no input/output of gp service, the map service is destined to be failing. This is as designed for now. So the work around is not to call the function and set the blank in your output parameter. Not the best way, but at least won't fail when you run the service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 19:36:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699657#M23189</guid>
      <dc:creator>ShingLin</dc:creator>
      <dc:date>2012-10-19T19:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699658#M23190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;HI, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The issue is in setting the null derived output in a Geoprocessing Service. Neither ArcMap, or the AGS Map Service Layer knows about the null part of it and fails. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The issue is not recreatable as a standalone tool (one that is not a service). It is just present in the Geoprocesing Service behaviour. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Susan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 19:30:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699658#M23190</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-10-21T19:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699659#M23191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In the code u provided, are the following code executed when count = 0? It should not be. But the error message you sent seems showing this part of code was executed. If it does, it will fail because the output is overwritten outraster which is invalid. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#TODO: process Kerenl Density&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;processStart=datetime.datetime.now()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage("***generate Kernel Density Surface")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.gp.KernelDensity_sa("inFeatures1", modelFld, outRaster, "", searchReadius, "SQUARE_MAP_UNITS")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(str(datetime.datetime.now()-processStart))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#TODO: check In License&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage("***check In Spatial Analyst")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CheckInExtension("spatial")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#TODO: set Output&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage("***set The Output Layer")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SetParameter(6,outRaster)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 22:41:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699659#M23191</guid>
      <dc:creator>ShingLin</dc:creator>
      <dc:date>2012-10-22T22:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699660#M23192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's correct. If the number of selected features is 0, Kernel Density will not run. Instead a null output is specified and the application bails when a null raster layer is being set as AGS Dynamic Map Service Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is almost as if the default setting from the publsihing mxd is overriding the null output passed back to the AGS Dynamc Map Service Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand we are trialing the heat map sample using the javascript api and html5 framework. &lt;/SPAN&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2012/09/26/heat-up-your-webmaps/"&gt;http://blogs.esri.com/esri/arcgis/2012/09/26/heat-up-your-webmaps/ &lt;/A&gt;&lt;SPAN&gt;This quite a big difference from the Geoprocessing Service. It is custom code with a mix of open source and ESRI technologies. It is very much a R&amp;amp;D exercise because we exhausted the Proof of Concept funding for the work.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's kind of scary resorting to a non-tested, non-supported solution though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Susan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 17:24:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699660#M23192</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-10-23T17:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699661#M23193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We picked up on this yesterday again and made some further progress.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We will have tio first initialize the outRaster as a none before with start with the Surface Generation function. After this, we can include a status variable &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#TODO: THIS IS Important part �?? setting outRaster to None initially&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outRaster=None&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#TODO: Check Count&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If cnt&amp;gt;0:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #run The hotspot&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; outRaster=�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Status=�?�true�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Else:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status=�?�false&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#assign Parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If Status=�?�true�?�:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SetParameter(6,outRaster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SetParameter(6,outRaster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Susan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 22:23:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699661#M23193</guid>
      <dc:creator>SusanJones</dc:creator>
      <dc:date>2012-11-15T22:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Pass a null result back to a dynamic map Service from a geoprocessing task</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699662#M23194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for updating. Is this part of your code correct? It seems there is no need of 'if .. else' statement since both logic condition executes the same function and parameter&amp;nbsp; arcpy.SetParameter(6,outRaster). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If Status=�?�true�?�:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SetParameter(6,outRaster)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SetParameter(6,outRaster)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 00:09:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/pass-a-null-result-back-to-a-dynamic-map-service/m-p/699662#M23194</guid>
      <dc:creator>ShingLin</dc:creator>
      <dc:date>2012-11-21T00:09:44Z</dc:date>
    </item>
  </channel>
</rss>

