Select to view content in your preferred language

Attribute Assistant - generate unique id based on domain value in another field

3042
9
Jump to solution
06-24-2020 01:39 AM
Labels (2)
JonKwong1
Emerging Contributor

I have parcels with different landuse classes: Business, Residential, etc. I would like to generate a unique id when the parcel is being split. However, I need to generate a different id and counter depending on the landuse class. If Business, then generate B1, B2, B3, etc. If Residential, then generate R1, R2, R3, etc.

This is my progress.

Table NameField NameValue MethodValue InfoOn Create
ParcelPLOT_IDGENERATE_IDCOUNTER_BTRUE
ParcelPLOT_IDGENERATE_IDCOUNTER_RTRUE
ParcelPLOT_IDEXPRESSIONIIf([TYPE]="Business","B" & [PLOT_ID],"")TRUE
ParcelPLOT_IDEXPRESSIONIIf([TYPE]="Residential","R" & [PLOT_ID],"")TRUE

I could not figure out how to trigger it. Any help would be appreciated.

0 Kudos
1 Solution

Accepted Solutions
MikeMillerGIS
Esri Frequent Contributor

You can use one seq and put that value in the field and then use an expression to put the proper prefix

View solution in original post

0 Kudos
9 Replies
MikeMillerGIS
Esri Frequent Contributor

Is the layer subtyped by the type? If so you can specify that in the Table Name, such as Parcel|1. Without that, you cannot use different sequences.

JonKwong1
Emerging Contributor

Unfortunately it is not subtyped. 

So, what if both IDs share the same sequence? For example the sequence is B1, B2, B3, R4, R5, R6. If I split R6, I'll get R7. Is that possible?

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

You can use one seq and put that value in the field and then use an expression to put the proper prefix

0 Kudos
JonKwong1
Emerging Contributor

I tried this, but I am not getting expected results.

Table NameField NameValue MethodValue InfoOn CreateRule Weight
ParcelPLOT_IDGENERATE_IDCOUNTERTRUE1
ParcelPLOT_IDEXPRESSIONIIf([TYPE]="Business","B" & [PLOT_ID],IIf([TYPE]="Residential","R" & [PLOT_ID]))TRUE0
0 Kudos
MikeMillerGIS
Esri Frequent Contributor

Syntax is not complete, iif(statement, what to do when true, what to do when false)

IIf(="Business","B" & ,IIf(="Residential","R" & ,))

0 Kudos
JonKwong1
Emerging Contributor

OK. I tried this with the cut polygon tool but I only get the sequence without the prefix.

Table NameField NameValue MethodValue InfoOn CreateRule Weight
ParcelPLOT_IDGENERATE_IDCOUNTERTRUE1
ParcelPLOT_IDEXPRESSIONIIf([TYPE]="Business","B" & [PLOT_ID],IIf([TYPE]="Residential","R" & [PLOT_ID], [PLOT_ID]))TRUE0
0 Kudos
MikeMillerGIS
Esri Frequent Contributor

Need to turn the log file on and see what it says

0 Kudos
JonKwong1
Emerging Contributor

The log is very useful. I found my mistake. Accidentally changed the value method. It is working now. Thanks a lot.

0 Kudos
JoeBryant1
Frequent Contributor

This use of the feature class name followed by the subtype number in the Table Name field of the DynamicValue table is an excellent find! I've seen other, less than ideal solutions from ESRI support on how to use different subtypes sequences, but this is the most elegant and easy to implement by far. I just wish it was easier to find in the Attribute Assistant documentation.

0 Kudos