Is This Content Helpful?
We're glad to know this article was helpful.
The Calculate Field tool is part of a model published as a geoprocessing service. The model works correctly prior to publishing the toolbox to ArcGIS Server. If ArcGIS Desktop is not installed on the same machine as ArcGIS Server, the geoprocessing messages state that the tool executed successfully, but the field is not correctly calculated.
This behavior occurs with both ArcGIS Server for the .NET Framework and ArcGIS Server for the Java Framework.
In a new field that is meant to be populated by the Calculate Field tool, the problem manifests itself by returning blank values.
The Expression parameter for the Calculate Field tool uses a VB expression by default, but ArcGIS Server does not include the VB libraries required to execute this function.
Change the Expression Type parameter for the Calculate Field tool to PYTHON_9.3.
The expression type must be Python when running Calculate Field with ArcGIS Engine or ArcGIS Server. Visual Basic for Applications (VBA) is required for many types of VB expressions, and VBA is only available when Calculate Field is run by ArcGIS Desktop. Only use Python as the expression type whenever the tool is included in a model that is published to ArcGIS Server.