Is there a way to auto generate ID numbers based on a subtype field?

919
3
09-20-2018 01:29 PM
AustinWolf1
New Contributor II

I'm using the Attribute Assistant add on to try to achieve this task. Is there an expression that I could write in the DynamicValue table so that the tool looks at the subtype field of a feature class and then determines which Sequence that it needs to use?

For example, I'm working with a dummy valve feature class where there are two subtypes : 3 and 6.

The largest Subtype 3 valve ID number is 0107910, and the largest Subtype 6 valve ID is 1702300. How can I get the tool to update these two ID numbers independently but within the same feature class?

0 Kudos
3 Replies
JakeSimms1
Esri Contributor

Austin, are you looking to update the ID so that when, for example, Subtype 3 gets an sequence and Subtype 6 gets its own sequence in the same features ID attribute?

0 Kudos
JoeBorgione
MVP Emeritus

I think if you create individual rows in yourGenerate ID table for each, you should be able to. ( Configure GenerateID table - Attribute Assistant | ArcGIS Solutions )  However, your use of an ID with a leading zero ( 0107910) may be problematic for you.

That should just about do it....
0 Kudos
AdamEversole1
Esri Contributor

Hi Austin, We just ran across a similar thing on a support case and i wanted to share this as it might help. 

Attached is working sample and proof of concept to assist in your own workflows.

http://www.arcgis.com/home/item.html?id=ac2fd27fadeb4bb0849fce47930093b0 

We know a Generate ID method can only have one count per field, Given this, this example uses a Sub-type field, and 3 Separate Id fields each with their own Generate ID Methods. The Sybtype filed is responsible for setting the attribute (1,2,3) in The Sybtype. A series of Field Trigger reads the Subtype value and adds a place holder value in the opposing ID fields. The Generate ID running on each ID field will only activate on the Null record and thus count each subtype independently. 

Supporting Documentation:
https://solutions.arcgis.com/shared/help/attribute-assistant/documentation/methods-all-methods/#fiel...
https://solutions.arcgis.com/shared/help/attribute-assistant/documentation/methods-all-methods/#gene...
https://desktop.arcgis.com/en/arcmap/10.3/manage-data/subtypes/creating-subtypes.htm