AnsweredAssumed Answered

Update Attribute with Description from Domain List using a Model

Question asked by kaeldowdy on Nov 6, 2014
Latest reply on Nov 6, 2014 by kaeldowdy

Hello,

 

This is something I would think would be easy, but I'm stumbling around...

 

I have a model that I'm using to transfer a feature class from an Oracle SDE to a file GDB (using the Feature Class to Feature Class tool).  Just to make the illustration simple, in the Field Map parameter for that tool, I have two fields:

 

  • Construction_Status_ID (which comes from the SDE -- Long datatype -- but displays the coded value/description from the domain list)
  • Construction_Status (which is a field I added --Text datatype -- and I mapped the Construction_Status_ID to it)

 

When the tool runs, and I look at the attribute table, I can see the translated description in the Construction_Status_ID field but in the Construction_Status field, I just see the coded value.  It's weird too that the Construction_Status_ID field is right-justified (just like it is for long or integer datatypes), but I guess that's to be expected since that datatype is actually a long.

 

At any rate, what I'm wanting to do is to update the Construction_Status field with my actual description value from my domain list (instead of the coded value).  I'm needing the data persisted for other steps down the line, so that's why I'm wanting the text description as opposed to the numerical value equivalent.

 

For example, here are what the values look like in the feature class that's in the GDB:

 

ObjectIDConstruction_Status_IDConstruction_Status
1Existing10
2Proposed20
3Retired30

 

While I'd like to be able to update or persist the actual text values during the Feature Class to Feature Class step, I'm not seeing a way to do it...

 

So, I'm looking for a tool that can accept a domain list as an input, and then map my coded value to the Construction_Status_ID field and then update the Construction_Status field to the domain list's description value.

 

I tried Field Calculator tool, but I didn't see a way to map or interface with a domain list -- although I could create a VB or Python function that would run over each row.  However, I'd have to hardcode each value for the lookup and I'd want to stay away from that if at all possible.

 

Is there a way to update an attribute in this way using a domain list as an input source?  My feature classes will have over 500K rows in case that plays a part in the solution.

 

Thanks for any ideas...

Outcomes