Use count of created features in task Field Calculator

11-05-2020 12:05 PM
Occasional Contributor II

I have a task that I put together to walk users through creating a shutdown notification. In this process, they create the area that will be affected, then create features to show the valves that will be closed. I would like to be able to take the count of these valves and use it to update a field in the Affected Area feature class. Similarly, I would also like to get the count of intersecting customer points and hydrants and use those to update fields. I can't seem to find a way to accomplish either of these operations using the built-in settings in Task Designer. I know I could probably put together a Python script tool to accomplish this, but is there something I'm just missing here? Tasks can keep track of items created while running the task for selection and verification purposes, so I imagine it wouldn't be too much of a leap to pass the count of those features as a variable.

0 Kudos
1 Reply
Esri Regular Contributor

Hi Jay,

I think I have an easier way for you to accomplish your workflow: use Attribute Rules (calculation).

You can update fields in the 'affected area' polygon by using the Arcade Intersect method:

If needed you can use a task step to trigger an update event on the 'Affected Area' feature.

Here is an example of a parcel polygon using the method to find a field value in another layer. In your case you can use the Count method. You might need to combine a SQL query to only select valve that are closed. 



0 Kudos