Select to view content in your preferred language

Create new value column based other text column

862
2
Jump to solution
10-01-2012 09:34 AM
BjörnTuregård
Emerging Contributor
Hello! New on the forum and not an expert on GIS, and thats why I'm here.
I have a problem where I would like to create a new column in an attribute table that I have. It has over 800 posts and I would like to create a new column with simple values (1-10) based on another column with text named "geology". The geology column contains values like "stone" "silt" "clay" and so on, so there are many fields containing the same values. I would like the new column to have all the stone fields in the geology column to have the value 1 in the new, silt 2 and so on. More or less converting the explanatory geology text column into a new column with values representing the different coverages. Is there a tool for it or do I have to struggle with coding which I am very new to?
Thanks in advance!
/Björn Turegård
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JonathanQuinn
Esri Notable Contributor
What you can do is use the Dissolve tool on the Geology field, then in the output, create a new field and number the different types however you need them.  Then, join this new table back to your original data.

You can also look into domains, which are used to enforce data integrity by using code values to describe other values.  First, create a new file geodatabase, if the data isn't already stored in one and import your shapefile into it.  From your dissolved output, export the attribute table to a standalone table.  Then, use the Table to Domain tool and fill out the table accordingly.  Finally, set the new text field you have to use the domain you just created.

View solution in original post

0 Kudos
2 Replies
JonathanQuinn
Esri Notable Contributor
What you can do is use the Dissolve tool on the Geology field, then in the output, create a new field and number the different types however you need them.  Then, join this new table back to your original data.

You can also look into domains, which are used to enforce data integrity by using code values to describe other values.  First, create a new file geodatabase, if the data isn't already stored in one and import your shapefile into it.  From your dissolved output, export the attribute table to a standalone table.  Then, use the Table to Domain tool and fill out the table accordingly.  Finally, set the new text field you have to use the domain you just created.
0 Kudos
BjörnTuregård
Emerging Contributor
Thanks a lot! The dissolve tool fixed it really quick and easy! Wish I would've asked earlier yesterday instead of struggleing on my own 😃

Regards /Björn Turegård
0 Kudos