Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

When editing I want to be able to change the attributes of one field and upon doing this allow for the automatic update of another field in the same attribute table. Essentially I have one layer with a code, description and legend information. I would like to be able to edit the code and have the description and the legend information update with this edit with its correct description and legend information. Is there any way to do this within ArcMap's tools or an associated script? Thanks,

share|improve this question
1  
You could join a table containing the code, description and legend information to the feature class/table with the code you are editing. –  blah238 Sep 20 '12 at 17:23
add comment

3 Answers

You could also try making a relationship table if you are working out of a geodatabase. See the link below:

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//004t00000006000000.htm

share|improve this answer
1  
A join will let you query, label and symbolize on joined columns, while a relate or relationship class will not: help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//… –  blah238 Sep 20 '12 at 17:31
    
I suppose I am misunderstanding the question then. I was just thinking back to when we did a city signage project and Public Works was using a different MUTCD code for signs than what we were. We used an attributed relationship class so that as we were adding new signs with our MUTCD code, the code Public Works used was automatically joined to our table so we could label the signs using their code instead of ours. I was just thinking if the description and legend info were tied to a specific value in the attribute table, this would work. –  crmackey Sep 20 '12 at 18:07
    
You can certainly use both relationship classes and joins, I was just pointing out that you'll definitely need a join if you want to use the related table for querying/symbolizing/labeling. –  blah238 Sep 20 '12 at 20:29
add comment

You could create a simple python field calculator script that you run to update the description field values when you are done with your edits, see example below:

def checkValue(c,d):
  if c == 1:
    return 'one'
  if c == 2:
    return 'two'
  if c == 3:
    return 'three'
  if c == 4:
    return 'four'

enter image description here

share|improve this answer
add comment

What kind of spatial database are you working with? A shapefile? Personal or File Geodatabase? ArcSDE?

If you are working with an SDE database on traditional RDBMS (MS SQL, ORACLE, Postgres) you could use a database trigger to help automatically update fields when a change is made to another.

If you are working with a shapefile or pgdb/fgdb, you won't have this option as triggers are not supported in their database structures.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.