calculate_field
Write computed values to an attribute field in an ArcGIS Pro layer using Python, Arcade, or SQL expressions, so you can update areas, ratios, or other derived attributes.
Instructions
Calculate field values across a layer, e.g. expression "!Shape_Area! / 10000".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map_name | No | Map to act on; defaults to the active map. | |
| code_block | No | Optional helper function definitions. | |
| expression | Yes | Expression. | |
| field_name | Yes | Field to write to. | |
| layer_name | Yes | Layer or table name as shown by get_layers, or a full dataset path. | |
| expression_type | No | PYTHON3, ARCADE or SQL. | PYTHON3 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |