{ "name": "CalculateField", "displayName": "Calculate Field", "description": "Geoprocessing tool that calculates the values of a field for a feature class, feature layer, or raster.", "category": "", "helpUrl": "https://gis-portal.usc.edu/arcgis/rest/directories/arcgisoutput/CalculateField_GPServer/CalculateField/CalculateField.htm", "executionType": "esriExecutionTypeAsynchronous", "parameters": [ { "name": "in_table", "dataType": "GPString", "displayName": "Input Table", "description": "The table containing the field that will be updated with the new calculation.", "direction": "esriGPParameterDirectionInput", "defaultValue": "Angeles_Trails", "parameterType": "esriGPParameterTypeRequired", "category": "", "choiceList": [ "Angeles_Trails", "Cucamonga Wilderness", "Angeles National Forest", "LA County" ] }, { "name": "field", "dataType": "GPString", "displayName": "Field Name (Existing or New)", "description": "The field that will be updated with the new calculation.If a field with the specified name does not exist in the input table, it will be added.", "direction": "esriGPParameterDirectionInput", "defaultValue": "Ranked_Weight", "parameterType": "esriGPParameterTypeRequired", "category": "", "choiceList": [ "Shape", "Name", "OBJECTID", "Length", "Elev_Gain", "Max_Elev", "Trail_Type", "Shape_Length", "Ranked_Weight" ] }, { "name": "expression", "dataType": "GPString", "displayName": "Expression", "description": "The simple calculation expression used to create a value that will populate the selected rows.", "direction": "esriGPParameterDirectionInput", "defaultValue": "0", "parameterType": "esriGPParameterTypeRequired", "category": "" }, { "name": "expression_type", "dataType": "GPString", "displayName": "Expression Type", "description": "Specifies the type of expression that will be used.PYTHON and PYTHON_9.3 are still supported for backward compatibility but are not listed as choices. Python scripts that use these keywords will continue to work.Python 3 (PYTHON3 in Python) returns the values in date fields as Python datetime objects. PYTHON and PYTHON_9.3 return the values in date fields as strings.Python 3\u2014Python expression type. This is the default.Arcade\u2014Arcade expression type.SQL\u2014SQL expression.To learn more about Python expressions, see Calculate Field examples.To learn more about Arcade expressions, see the ArcGIS Arcade guide.To learn more about SQL expressions, see Calculate field values.SQL expressions were implemented to support faster calculations for feature services. Instead of performing calculations one feature or row at a time, a single request is set to the feature service, resulting in significantly faster calculations.Only feature services support SQL expressions. For other formats, use Python or Arcade expressions.", "direction": "esriGPParameterDirectionInput", "defaultValue": "PYTHON3", "parameterType": "esriGPParameterTypeOptional", "category": "", "choiceList": [ "PYTHON3", "ARCADE" ] }, { "name": "code_block", "dataType": "GPString", "displayName": "Code Block", "description": "A block of code that will be entered for complex expressions.", "direction": "esriGPParameterDirectionInput", "defaultValue": "", "parameterType": "esriGPParameterTypeOptional", "category": "" }, { "name": "out_table", "dataType": "GPFeatureRecordSetLayer", "displayName": "Updated Input Table", "description": "", "direction": "esriGPParameterDirectionOutput", "defaultValue": { "displayFieldName": "", "hasZ": true, "geometryType": "esriGeometryPolyline", "spatialReference": { "wkid": 4326, "latestWkid": 4326, "vcsWkid": 115700, "latestVcsWkid": 115700 }, "fields": [ { "name": "OBJECTID_1", "type": "esriFieldTypeOID", "alias": "OBJECTID_1" }, { "name": "Name", "type": "esriFieldTypeString", "alias": "Trail Name", "length": 255 }, { "name": "OBJECTID", "type": "esriFieldTypeInteger", "alias": "OBJECTID" }, { "name": "Length", "type": "esriFieldTypeDouble", "alias": "Length" }, { "name": "Elev_Gain", "type": "esriFieldTypeInteger", "alias": "Elev_Gain" }, { "name": "Max_Elev", "type": "esriFieldTypeInteger", "alias": "Max_Elev" }, { "name": "Trail_Type", "type": "esriFieldTypeString", "alias": "Trail Type", "length": 8000 }, { "name": "Ranked_Weight", "type": "esriFieldTypeInteger", "alias": "Ranked_Weight" }, { "name": "Shape_Length", "type": "esriFieldTypeDouble", "alias": "Shape_Length" } ], "features": [], "exceededTransferLimit": false }, "parameterType": "esriGPParameterTypeOptional", "category": "" }, { "name": "field_type", "dataType": "GPString", "displayName": "Field Type", "description": "The field type of the new field. This parameter is only used when the field name does not exist in the input table.If the field is of type text, the new field will have a length of 512. For shapefiles and dBASE files, the field will have a length of 254. The length of the new field can be adjusted using the Alter Field tool.Text\u2014Any string of characters. Float (single precision)\u2014 Fractional numbers between -3.4E38 and 1.2E38.Double (double precision)\u2014 Fractional numbers between -2.2E308 and 1.8E308.Short (small integer)\u2014 Whole numbers between -32,768 and 32,767.Long (large integer)\u2014 Whole numbers between -2,147,483,648 and 2,147,483,647.Date\u2014Date and time. Blob (binary data)\u2014Long sequence of binary numbers. Raster imagery\u2014Raster images. All ArcGIS software-supported raster dataset formats can be stored, but it is highly recommended that only small images be used.GUID (globally unique identifier)\u2014Globally unique identifier.", "direction": "esriGPParameterDirectionInput", "defaultValue": "TEXT", "parameterType": "esriGPParameterTypeOptional", "category": "", "choiceList": [ "TEXT", "FLOAT", "DOUBLE", "SHORT", "LONG", "DATE", "BLOB", "RASTER", "GUID" ] }, { "name": "esri_out_feature_service_name", "dataType": "GPString", "displayName": "Output Feature Service Name", "description": "The name of the optional feature service to create on the federated server containing the result of this tool. If no name is specified an output feature service will not be created.", "direction": "esriGPParameterDirectionInput", "defaultValue": "", "parameterType": "esriGPParameterTypeOptional", "category": "" } ] }