Hi,
I currently have a field with domain applied to it. I copied over bunch of values to the domain field using field calculator. My expectation was that the domain will exclude all the non - domain values ( Null) and keep only the values that are in the domain list. Apparently, it is not happening. Non - domain values are still showing in the domain field. Does anyone know how this could be fixed?
Thanks.
Solved! Go to Solution.
Hi,
It needs to match the 'code' not the 'description', as the code is what's stored in the database and the description is what it's shown as. That'll be why it's failing for you.
I think that will make the drop down of code values , not description values. For example, the drop down list of domain field will give a list of Code 1 , Code2, Code3 .... instead of giving PRV1, PRV2, PRV3.
Or am I misunderstanding how domain works?
The code is what's stored in the db and the description is what's shown. If you try to enter the description into the database it won't recognise it as a valid option. When digitising information in pro it will present you the description in the drop down but store the code behind the scenes. You can see that in action by switching off "show domain and subtype descriptions" check box in the attribute table.
So to successfully populate that data over you will have to find a way of converting those "description" values to their respective codes, I'd personally use a dictionary as a lookup table.
Ah you are absolutely right. Thank you so much for the help!
No worries 🙂 glad I could help out! Do you want to mark this as solved so people know we've got a resolution?
Will do . Thanks again!
In reviewing the screen grab of the error message thrown in the tool, I found this link here regarding the description of the error and the solution. Are you doing any field mapping at all?
I am just using Field Calculator to move data to domain field.