AnsweredAssumed Answered

Published Geoprocessing tool not calculating field

Question asked by on Nov 22, 2018
Latest reply on Nov 27, 2018 by bixb0012

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.  Any thoughts would be great.  Thanks


This is the Python code:

import arcpy

fc = arcpy.GetParameterAsText(0)
Shift = arcpy.GetParameterAsText(1)

arcpy.AddMessage("Calculating Shift")
output = arcpy.CalculateField_management(in_table=fc, field="SHIFT", expression='"{}"'.format(Shift), expression_type="PYTHON")

This is a screenshot of the Geoprocessing Tool I have created.  I have also tried Feature Set as a Data Type.

This is a screenshot of the Server Messages: