Good morning,
When creating an attribute rule for a point or line feature class, how can I calculate the ID value of a new feature if the code includes, for example, the municipality code or the commission district code of the polygon in which it is digitized?
Additionally, if a line intersects multiple municipalities, how can we determine which one to use for the ID. Should we select the first, the longest intersected, or apply another criteria?
Take a look at the templated rule - Generate ID. It has a option "Sequence by lookup" that could use an unique seq for grid. The templated rule writes the arcade, which you could modify to also get an ID field from the intersected layer.
Hello,
Does it work when the Municipality, Commission District or Grid layer is in another SDE database.?
Attribute Rules can only access tables in their own database. But there is a trick - https://support.esri.com/en-us/knowledge-base/creating-attribute-rules-to-access-feature-classes-in-...
The other thing to add, depending on if you are using an enterprise sde database, is the NextSequenceValue. This is first generated by running the generate sequence tool that, once created, will autoincrement a new numerical number. If you are looking make that id alphanumeric, then you can concatenate the next sequential number with any string characters you want.