<?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 Published Geoprocessing tool not calculating field in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129726#M10081</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a simple Geoprocessing tool using a Python script that works fine in my ArcMap 10.5.1 session, but when I publish it to a Geoprocessing Service on our ArcGIS Server and bring it back in as Tool in ArcMap, it runs, but doesn't calculate the field of the selected features.&amp;nbsp; Any thoughts would be great.&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the Python code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;import arcpy&lt;BR /&gt;&lt;BR /&gt;fc = arcpy.GetParameterAsText(0)&lt;BR /&gt;Shift = arcpy.GetParameterAsText(1)&lt;BR /&gt;&lt;BR /&gt;arcpy.AddMessage("Calculating Shift")&lt;BR /&gt;output = arcpy.CalculateField_management(in_table=fc, field="SHIFT", expression='"{}"'.format(Shift), expression_type="PYTHON")&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is a screenshot of the Geoprocessing Tool I have created.&amp;nbsp; I have also tried Feature Set as a Data Type.&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/430162_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;This is a screenshot of the Server Messages:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/430178_pastedImage_6.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Nov 2018 23:53:55 GMT</pubDate>
    <dc:creator>DarrylKlassen1</dc:creator>
    <dc:date>2018-11-22T23:53:55Z</dc:date>
    <item>
      <title>Published Geoprocessing tool not calculating field</title>
      <link>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129726#M10081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a simple Geoprocessing tool using a Python script that works fine in my ArcMap 10.5.1 session, but when I publish it to a Geoprocessing Service on our ArcGIS Server and bring it back in as Tool in ArcMap, it runs, but doesn't calculate the field of the selected features.&amp;nbsp; Any thoughts would be great.&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the Python code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;import arcpy&lt;BR /&gt;&lt;BR /&gt;fc = arcpy.GetParameterAsText(0)&lt;BR /&gt;Shift = arcpy.GetParameterAsText(1)&lt;BR /&gt;&lt;BR /&gt;arcpy.AddMessage("Calculating Shift")&lt;BR /&gt;output = arcpy.CalculateField_management(in_table=fc, field="SHIFT", expression='"{}"'.format(Shift), expression_type="PYTHON")&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is a screenshot of the Geoprocessing Tool I have created.&amp;nbsp; I have also tried Feature Set as a Data Type.&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/430162_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;This is a screenshot of the Server Messages:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/430178_pastedImage_6.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2018 23:53:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129726#M10081</guid>
      <dc:creator>DarrylKlassen1</dc:creator>
      <dc:date>2018-11-22T23:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Published Geoprocessing tool not calculating field</title>
      <link>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129727#M10082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it is calculating on a temporary feature layer in memory. Not updating a feature class in a db.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2018 09:31:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129727#M10082</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2018-11-23T09:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Published Geoprocessing tool not calculating field</title>
      <link>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129728#M10083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I just don't know how to&amp;nbsp; make it update the FC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2018 16:24:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129728#M10083</guid>
      <dc:creator>DarrylKlassen1</dc:creator>
      <dc:date>2018-11-23T16:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Published Geoprocessing tool not calculating field</title>
      <link>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129729#M10084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Surely the data type should be a feature class&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2018 07:57:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129729#M10084</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2018-11-26T07:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Published Geoprocessing tool not calculating field</title>
      <link>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129730#M10085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the look of your screenshot, the geoprocessing service is getting the data and updating it, but the data isn't being returned back to you because your geoprocessing tool isn't configured to supply an output data source.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2018 18:34:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129730#M10085</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-11-26T18:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Published Geoprocessing tool not calculating field</title>
      <link>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129731#M10086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua, thanks for your reply.&amp;nbsp; The output data source is always just the same as the input data source for Calculate Fields.&amp;nbsp; I am not sure how to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2018 18:35:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129731#M10086</guid>
      <dc:creator>DarrylKlassen1</dc:creator>
      <dc:date>2018-11-27T18:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Published Geoprocessing tool not calculating field</title>
      <link>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129732#M10087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Geoprocessing services are not going to directly manipulate data on your client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most, but not all, geoprocessing tools take input data and return newly created output data.&amp;nbsp; These geoprocessing tools lend themselves to geoprocessing services because data is uploaded to the service, it is processed, and then a new data set is returned to the client.&amp;nbsp; For geoprocessing tools that operate on data directly, additional steps are required to get the data back to the client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardless of which kind of geoprocessing tools are being used in a script or model and published as a geoprocessing service, the script needs to be configured and written to have output parameters just like input parameters.&amp;nbsp; From your screenshots, you don't appear to have any output parameters, so there is no way for the geoprocessing service to return the updated table back to your client.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2018 01:32:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/published-geoprocessing-tool-not-calculating-field/m-p/129732#M10087</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-11-28T01:32:31Z</dc:date>
    </item>
  </channel>
</rss>

