Select to view content in your preferred language

How to auto update coded value attribute domain in one field based on corresponding description in another field in attribute table?

2096
3
10-25-2016 02:36 PM
KushendraShah1
Emerging Contributor

Hi,

I have a field  called 'Forage_Typ' that has the domain attribute linked in its field properties while the other field 'FType' doesn't have attribute domain. I wanted to auto populate the coded value 'code' in 'FType' field based on the value (domain description) entered in 'Forage_Typ'. Is there way I can do by python script in field calculator? I appreciate for any help. Thanks.

0 Kudos
3 Replies
BlakeTerhune
MVP Regular Contributor

This can be done with Python but it isn't "dynamic." You would have to run the script each time you wanted the domain to be updated with new coded values. Is that acceptable?

KushendraShah1
Emerging Contributor

Thanks for the clarification Blake. That is what I think now. Actually, I didn't find any idea in regards to this issue posted in the forum. I hope it can be done in future. 

0 Kudos
RandyBurton
MVP Alum

If I understand what you are trying to do, I would suggest using the Domain To Table tool to create a table, then join the table to your feature.  Then you could use the field calculator to set the field in your feature to equal the one you want from the domain table.