1

ArcGIS Pro 2.9:

Is there a way to return values to multiple fields using an Arcade calculation attribute rule?

For example, return values to the following fields, all within a single expression/rule:

  1. Shape
  2. Midpoint
  3. Vertex_Count

There's a section in the docs about Returning values from scripts.

But I can't quite wrap my head around how to return values to multiple fields.

1 Answer 1

1

From: Attribute rule dictionary keywords

You can return a result as a dictionary to update multiple fields of the feature. When returning a result as a dictionary, the target field in the attribute rule is optional.

return {
    //result is a dictionary
    "result": {
        "attributes": {
            "field1": 'field1', //updates field1 in the $feature 
            "field2": 11 //updates field2 in the $feature 
        },
        "geometry": Rotate($feature) //updates geometry in $feature
    }

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.