Select to view content in your preferred language

how to update the UniqueID for each subtype

1493
4
11-09-2016 10:49 AM
santhoshp
Occasional Contributor

Dear Friends,

I have numbers feature class and subtypes.

Each subtype have separate Asset Code Range in excel sheet attached here.

Starting the FloorID is second Level below ground floor(B2) up to Sixth Floor(F6). 

Floor ID_Domain Code in below.

B2-B1-GF-BM-F1-F2-F3-F4-F5-F6-UR

Example : See In  How to give the UniqueID For Each Subtype excel sheet.

Thanks

Sathosh

Tags (2)
0 Kudos
4 Replies
RebeccaStrauch__GISP
MVP Emeritus

Hi Sathosh,

I'm having a little trouble understanding if you are trying to create a new unique id for the unique combination of the four fields (subtypcd, floor_id_code, floor_id_full_name, asset_id), or if you are trying to create the field ASSET_ID based on the unique combination of the other three.

Can you make it a bit clearer on what data you currently have, and what field you are trying to populate?  I'm thinking others might be confused too, and that may be why you haven't received any responses yet.

it would also help to know if this is a feature class in a FGDB or a SQL or Oracle database, or other.  It might not matter, but would not hurt to include that info.  Also, are you trying to automate this with Python code, Model builder, Field-calculator or a different process. 

If you have already tried some code in python or some other method, it would also help if you say what you have tried to give others a starting point.  This might prompt more responses.

0 Kudos
santhoshp
Occasional Contributor

Dear Rebecca,

Below the Example give two subtype and range code. How to create the Unique_ID for Range code and each subtypes.

 SubtypesRange Code 
 Riser Down Fittinga52804280001 
 Riser Up Fittinga52804290001 
    
Object_IDSubtypesFloor_IDHow To Create Unique_ID for (Asset_ID Field)
1Riser Up FittingSecond Level below ground floora52804290001
2Riser Up FittingSecond Level below ground floora52804290002
3Riser Up FittingFirst Level below ground floora52804290003
4Riser Up FittingFirst Level below ground floora52804290004
5Riser Up FittingGround Floora52804290005
6Riser Up FittingGround Floora52804290006
7Riser Up FittingFirst Floora52804290007
8Riser Up FittingFirst Floora52804290008
9Riser Up FittingFirst Floora52804290009
10Riser Up FittingSecond Floora52804290010
11Riser Up FittingSecond Floora52804290011
12Riser Up FittingSecond Floora52804290012
13Riser Up FittingThird Floora52804290013
14Riser Up FittingThird Floora52804290014
15Riser Up FittingThird Floora52804290015
16Riser Up FittingFourth Floora52804290016
17Riser Up FittingFifth Floora52804290017
18Riser Up FittingFifth Floora52804290018
19Riser Up FittingFifth Floora52804290019
20Riser Up FittingSixth Floora52804290020
21Riser Up FittingSixth Floora52804290021
22Riser Up FittingSixth Floora52804290022
23Riser Down FittingSecond Level below ground floora52804280001
24Riser Down FittingSecond Level below ground floora52804280002
25Riser Down FittingFirst Level below ground floora52804280003
26Riser Down FittingFirst Level below ground floora52804280004
27Riser Down FittingGround Floora52804280005
28Riser Down FittingGround Floora52804280006
29Riser Down FittingFirst Floora52804280007
30Riser Down FittingFirst Floora52804280008
31Riser Down FittingFirst Floora52804280009
32Riser Down FittingSecond Floora52804280010
33Riser Down FittingSecond Floora52804280011
34Riser Down FittingSecond Floora52804280012
35Riser Down FittingThird Floora52804280013
36Riser Down FittingThird Floora52804280014
37Riser Down FittingThird Floora52804280015
38Riser Down FittingFourth Floora52804280016
39Riser Down FittingFifth Floora52804280017
40Riser Down FittingFifth Floora52804280018
41Riser Down FittingFifth Floora52804280019
42Riser Down FittingSixth Floora52804280020
43Riser Down FittingSixth Floora52804280021
44Riser Down FittingSixth Floora52804280022
45Riser Down FittingSixth Floora52804280023

Thanks

Santhosh

0 Kudos
JoeBorgione
MVP Emeritus

The attribute assistant add-in has a method with which you can do this: Generate ID ( All methods - Attribute Assistant | ArcGIS Solutions )  You need to set up a sequence table ( Configure GenerateID table - Attribute Assistant | ArcGIS Solutions ).  In your case you'd need to trigger it with an IIF statement or series of IIF statements.  If your data is in a versioned enterprise geodatabase, the deployment of this method can be a little tricky.

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

Hello Santhosh

Just as a FYI, 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

0 Kudos