I have an attribute assistant rule that generates sequential facilityID's based on the separate generateid table.
This is an example of one:
wOperationalArea|AREAID|RPAREAID|3|RP[id][seq]|True
I am trying to replicate this in ArcGIS Pro with Arcade, are the new attribute rules able to reference this same generateid table?
Solved! Go to Solution.
Yes assuming all data is in the same database. Let's say you have point layers of Point1 and Point2, and a polygon layer named PolyZone. I assume you are using the Sequence by Intersect option? For this workflow you would first run the tool on Point1 with the PolyZone selected for the Sequence By Intersect. The Row ID Field should also be used if you want a unique sequence for each unique value in that field. Keep the Create Sequences parameter checked and run. Then run the tool on Point2 with all the same settings but this time uncheck Create Sequences parameter since the sequence(s) you want to use already exists. Once the attribute rules are applied, you can open the Expression Builder and view the rule_settings at the top of each attribute rule. Both should be pointing to the same sequence name(s) in the id_values section. Now both Point1 and Point2 will share the same sequence for each polygon in PolyZone.
The new template attribute rules are designed for this very purpose and the Generate ID Attribute Rule tool is what you want. However, the attribute rule that gets created by this tool is standalone arcade and does not use the old GenerateID table. All the configuration is set in the attribute rule itself. You need to use the tool's UI to define how you want the attribute rule to behave. Based on your example, it looks like you are using Generate ID By Intersect from the AA, which is possible in the new tool with the Sequence by Intersect parameter.
Thank you! As there is a lot of pre-existing data, once I implement this new rule, would I need to temporarily use the update trigger to sequence all of the pre-existing data so there are no duplicates?
If you want to populate ids into a new field then sure. But your existing data should be fine if you use the ID Builder parameter to define the Starting Value to the next available value. That should prevent collisions with existing data.
Thank you. Several of my feature layers have the same prefix of "IN". So the ID output is IN + 12345 + 001. "IN" being the prefix, "12345" being the zone the point is placed in, and then "001" being the padded sequence. If two separate point layers are placed in the same zone, they will have the same ID. With this new tool, is there a way for them to share a zone based sequence?
Yes assuming all data is in the same database. Let's say you have point layers of Point1 and Point2, and a polygon layer named PolyZone. I assume you are using the Sequence by Intersect option? For this workflow you would first run the tool on Point1 with the PolyZone selected for the Sequence By Intersect. The Row ID Field should also be used if you want a unique sequence for each unique value in that field. Keep the Create Sequences parameter checked and run. Then run the tool on Point2 with all the same settings but this time uncheck Create Sequences parameter since the sequence(s) you want to use already exists. Once the attribute rules are applied, you can open the Expression Builder and view the rule_settings at the top of each attribute rule. Both should be pointing to the same sequence name(s) in the id_values section. Now both Point1 and Point2 will share the same sequence for each polygon in PolyZone.
Thanks so much Ted!!