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 Name | Field Name | Value Method | Value Info | On Create |
---|---|---|---|---|
Parcel | PLOT_ID | GENERATE_ID | COUNTER_B | TRUE |
Parcel | PLOT_ID | GENERATE_ID | COUNTER_R | TRUE |
Parcel | PLOT_ID | EXPRESSION | IIf([TYPE]="Business","B" & [PLOT_ID],"") | TRUE |
Parcel | PLOT_ID | EXPRESSION | IIf([TYPE]="Residential","R" & [PLOT_ID],"") | TRUE |
I could not figure out how to trigger it. Any help would be appreciated.
Solved! Go to Solution.
You can use one seq and put that value in the field and then use an expression to put the proper prefix
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.
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?
You can use one seq and put that value in the field and then use an expression to put the proper prefix
I tried this, but I am not getting expected results.
Table Name | Field Name | Value Method | Value Info | On Create | Rule Weight |
---|---|---|---|---|---|
Parcel | PLOT_ID | GENERATE_ID | COUNTER | TRUE | 1 |
Parcel | PLOT_ID | EXPRESSION | IIf([TYPE]="Business","B" & [PLOT_ID],IIf([TYPE]="Residential","R" & [PLOT_ID])) | TRUE | 0 |
Syntax is not complete, iif(statement, what to do when true, what to do when false)
IIf(="Business","B" & ,IIf(="Residential","R" & ,))
OK. I tried this with the cut polygon tool but I only get the sequence without the prefix.
Table Name | Field Name | Value Method | Value Info | On Create | Rule Weight |
---|---|---|---|---|---|
Parcel | PLOT_ID | GENERATE_ID | COUNTER | TRUE | 1 |
Parcel | PLOT_ID | EXPRESSION | IIf([TYPE]="Business","B" & [PLOT_ID],IIf([TYPE]="Residential","R" & [PLOT_ID], [PLOT_ID])) | TRUE | 0 |
Need to turn the log file on and see what it says
The log is very useful. I found my mistake. Accidentally changed the value method. It is working now. Thanks a lot.