Select to view content in your preferred language

How to Create an Attribute Rule to Auto-Populate POLEID and BLOCK Fields Based on Maximum Value and Location

83
3
yesterday
YumkhaibamKabirAhmad
New Contributor

Hi everyone,

I'm working with a point feature class in a file geodatabase. I want to implement an attribute rule that triggers when a new point is added, with the following requirements:

1. Auto-populate the BLOCK field based on the location of the new pole. I have a polygon layer (BlockBoundary) that contains block boundaries with a BLOCK field.

2. Auto-generate a unique POLEID by identifying the highest existing POLEID value within the same block and incrementing it by 1 for the new feature.

Ideally, the POLEID should follow a padded text format (e.g., "0001", "0002", etc.), and should concatenate the block number with the sequence (e.g., "03-0001"). ( BLOCK and POLEID are in text format

Has anyone implemented a similar rule using Arcade in attribute rules? I'm looking for guidance or a sample script that handles:

Filtering existing features by blocking and calculating the max POLETAGID within that block

Returning a properly formatted new ID

Thanks in advance for your help,

Best regards,

Kabir Ahmad

0 Kudos
3 Replies
MikeMillerGIS
Esri Frequent Contributor

You can set up #1 using a templated AR - https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/template-attribute-rules.ht...

 

For number #2, I would suggest using a database sequence(also in the templated rule), and not rely on querying for a pole, that could lead to a racing condition and duplicate ids.

YumkhaibamKabirAhmad
New Contributor

Thank you the suggestion @ Mike, but template option is not available in my ArcPRO(3.5).

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

It should be, they where first included in 3.4.

Try here - 

MikeMillerGIS_0-1754065022365.png

 

or here

MikeMillerGIS_1-1754065056360.png

 

 

0 Kudos