Table to Domain tool to recognize unique values from feature class tables

419
1
06-15-2015 01:08 PM
Status: Open
Labels (1)
BrettRosso
New Contributor III

I was wondering if it would be possible to add some logic into the table to domain tool to do the following:

Recognize unique values (i.e within a feature class) to create a domain from. Currently will 99999 error stating that there is already a value for that table. Also, by stating that it is a text field so that a text to text domain can be established. 

Thanks,
Brett
 

1 Comment
RobertBorchert
This would be handy.

I sometimes do create domains based on existing data attributes.

First step is to standardize all the entries so there are situaitons where the same attribute is defined 2 more ways.  
Example:  Wire types are written at T2 #2 or T2-#2 or T2#2 etc.  They are all the same

Second Step:  make a copy of the feature table and bring it into Access.  Now copy and paste everything back into the table to make sure there is at least 2 of each uniquie attribute.  Get rid of all <null> or empty values.

Third Step:  In Access do a find duplicates query on the Attribute you wish to domain.

Fourth Step: Create a new table with 2 attributes for your domain.  Code & Description for the attribute names.

Fifth Step.  From your Find Duplicates Query copy and paste the results into the Code Field.

IF you would rather your domain be an Integer then paste it into the Description Field and add numberical values for the Code.

Sixth Step:  Use the Table to Domain tool to add your new domain to the Geodatabase of your choice.

It actually takes longer for me to type this out then it does to actually do it.