Select to view content in your preferred language

Changing individual values in an attribute table in 10.1 - Majorly stuck

1335
5
06-27-2013 01:52 PM
JamesDouglass
Emerging Contributor
Background-

I study seagrass in an estuary near Fort Myers, Florida. A colleague sends me a .shp file which contains a list of named points and their coordinates. I upload the points to my handheld GPS, navigate to them, and record characteristics of the seagrass (density, height, etc.) at each point. I enter those data into an excel spreadsheet.

I intended to turn my excel tables into map layers using the import XY data function. Try as I might to specify the correct coordinate and projection systems, my points invariably ended up clustered into a pinhead sized area hundreds of miles south of their real location. Finally I was able to get my data in the right places not by creating a new layer from the excel sheet, but by joining the excel data to the correctly projected points in the empty .shp file that my colleague had sent me earlier.

Now I am quality-checking the data and finding a few small mistakes in the attribute tables that I need to fix. I wish I could just click on a cell in the attribute table and type in the correct value, but apparently it's not that easy. Here's what I'm trying to do now, and what is happening:

1. I open my map.
2. I click "Editor toolbar"
3. I select "Start Editing" from the editor drop-down menu. I get a start editing window that says, "This map contains data from more than one database or folder. Please choose the layer or workspace to edit."
4. I Choose "MAY_2013_Quadzilla_PTS" which is one of the points layers I made by joining my data to my coordinates. I hit "OK"
5. I hit the "Attributes" icon on the Editor toolbar. A little window pops up on the side of the screen but it's empty. Nothing happens when I click the buttons in that window, so I close it.
6. I right click on "MAY_2013_Quadzilla_PTS" in the table of contents to open up the attribute table. I click on the cells in the table that I want to change and I start typing. Nothing happens.
7. I select the column with the data and I want to change. I pick "find and replace" from the table menu. I tell it to find "0" and replace it with "bare" because that's one of the changes I want to make. It says, "no records found." However, if I try to just "find" instead of replace a "0" it has no trouble finding a "0."
8. I get frustrated and go online here to ask for help.

If y'all have any tips for making changes to attribute tables in ArcGIS 10.1, let me know.

Thanks,
James
Tags (2)
0 Kudos
5 Replies
RichardFairhurst
MVP Alum
Background-

I study seagrass in an estuary near Fort Myers, Florida. A colleague sends me a .shp file which contains a list of named points and their coordinates. I upload the points to my handheld GPS, navigate to them, and record characteristics of the seagrass (density, height, etc.) at each point. I enter those data into an excel spreadsheet.

I intended to turn my excel tables into map layers using the import XY data function. Try as I might to specify the correct coordinate and projection systems, my points invariably ended up clustered into a pinhead sized area hundreds of miles south of their real location. Finally I was able to get my data in the right places not by creating a new layer from the excel sheet, but by joining the excel data to the correctly projected points in the empty .shp file that my colleague had sent me earlier.

Now I am quality-checking the data and finding a few small mistakes in the attribute tables that I need to fix. I wish I could just click on a cell in the attribute table and type in the correct value, but apparently it's not that easy. Here's what I'm trying to do now, and what is happening:

1. I open my map.
2. I click "Editor toolbar"
3. I select "Start Editing" from the editor drop-down menu. I get a start editing window that says, "This map contains data from more than one database or folder. Please choose the layer or workspace to edit."
4. I Choose "MAY_2013_Quadzilla_PTS" which is one of the points layers I made by joining my data to my coordinates. I hit "OK"
5. I hit the "Attributes" icon on the Editor toolbar. A little window pops up on the side of the screen but it's empty. Nothing happens when I click the buttons in that window, so I close it.
6. I right click on "MAY_2013_Quadzilla_PTS" in the table of contents to open up the attribute table. I click on the cells in the table that I want to change and I start typing. Nothing happens.
7. I select the column with the data and I want to change. I pick "find and replace" from the table menu. I tell it to find "0" and replace it with "bare" because that's one of the changes I want to make. It says, "no records found." However, if I try to just "find" instead of replace a "0" it has no trouble finding a "0."
8. I get frustrated and go online here to ask for help.

If y'all have any tips for making changes to attribute tables in ArcGIS 10.1, let me know.

Thanks,
James


Import the excel spreadsheet into a file geodatabase first.  Join the table to the points and then Export the points from the table of contents.  Edit the new points.  Should work without a problem from that point.  You can even rename the fields with a file geodatabase with 10.1 to get rid of the table names from the fields.

I never use Excel spreadsheets directly in ArcMap.  Nothing but problems result when I do.
0 Kudos
JamesDouglass
Emerging Contributor
Thanks Richard. Sounds like the problem is resulting because of the join.

When you say I should export the joined table, can you give me a little more advice on what format I should export it to, and where I should store it? Should I export it as a new lyr file and put it in the same map?

I'll give this a try this afternoon and see if it works.
0 Kudos
RichardFairhurst
MVP Alum
Thanks Richard. Sounds like the problem is resulting because of the join.

When you say I should export the joined table, can you give me a little more advice on what format I should export it to, and where I should store it? Should I export it as a new lyr file and put it in the same map?

I'll give this a try this afternoon and see if it works.


I like file geodatabase feature classes the best.  Create a File Geodatabase and export the shapefile into the file geodatabase as a new feature class.  When it finishes you will be asked if you want the feature class added to the map.  Click the button to add it, and it will become a new layer.  Shapefiles limit the field names length to 10 characters, which I believe causes a problem when you export with a join, since I think all of the field names get changed to the table names during the export.  File geodatabases don't have that problem.

All of the fields of the new feature class will be editable, since they will no longer be just a join, but an actual part of the feature class.  Joined tables are never editable through the join, only the primary table/shapefile/feature class they are joined to is editable.

The problem with using Excel file directly in ArcMap is that most things you do in ArcMap require that a table or feature class must have an ObjectID on every row.  Excel files do not support ObjectID fields, and as a result they usually don't behave when trying to do record selections and editing if they are used directly.
0 Kudos
JamesDouglass
Emerging Contributor
Thanks again.

I exported my joined tables to a file geodatabase and they became editable... except for one thing. I can't add fields.

It's ironic that as joined tables I could add fields but couldn't change values, while as feature classes in a geodatabase I can change values but can't add fields. The menu option is "greyed out." Am I missing something? I need to either add a field or change the format of a field from numeric to text so that I can change entries for seagrass density from "0" to "bare".

Any tips?

Thanks,
James
0 Kudos
RichardFairhurst
MVP Alum
Thanks again.

I exported my joined tables to a file geodatabase and they became editable... except for one thing. I can't add fields.

It's ironic that as joined tables I could add fields but couldn't change values, while as feature classes in a geodatabase I can change values but can't add fields. The menu option is "greyed out." Am I missing something? I need to either add a field or change the format of a field from numeric to text so that I can change entries for seagrass density from "0" to "bare".

Any tips?

Thanks,
James


You never can change types on an existing field using any ArcGIS tools.  It is a complaint that has been there for over a decade.  You have to create another new field or another new feature class to make the change.  (I know, annoying, but if ESRI hasn't responded to the single most popular idea on their ideas page and repeated user complaints over more than a decade, they won't change this for you).  Three ways to do that.

First involves adding a field of the correct type and calculating values into it.  You should be able to add fields to the new feature class (but never after starting edit mode, only outside of edit mode).  After populating the new field you can delete the unneeded field and rename the field you have added.  This method does not involve creating a new feature class.  However the field is always added at the end of the table.  You can't fix the order of the fields without using yet another tool and creating yet another feature class (Second biggest idea and complaint for more than a decade).

Second  involves creating a new feature class with the New wizard and import the schema of the feature class you now have.  You can change the schema settings of the fields before committing it (name, alias, type, etc).  You have to change the field types first before you can change most of the other settings (even if you don't want the type to change, you have to change it to something else and change it back before you can change the Domain or most other settings). After the schema is fixed the way you want it and the tool is run to create as an empty feature class, use the load tool (right click the empty feature class in Catalog and use the load option) to transfer records into it.

The third involves using the Feature Class to Feature Class tool.  In that tool you can right click the fields and access all of their properties to change them for the output feature class.  The tool creates a new feature class.

I forget if Feature Class to Feature Class tool can deal with reordering fields, but it might be able to do that.

Fourth option, create a Personal Geodatabase and copy the feature class into it if you have Access 2003 or later.  A Personal Geodatabase is an Access 2003 database.  Open the .mdb file in Access and change field names, types, orders etc., on the table that has your feature class name (don't touch the shape field or the area, length, or perimeter fields) and save the changes.  You can use this changed feature class in ArcMap from the personal geodatabase directly.  However, personal geodatabases are not that good, have many problems with storage size limits, joins, and other things, so I always end up copying them to the file geodatabase when I am done.  They also use Access 2003 format, and will stop being supported some day (Microsoft partnered with ESRI for a while, but they parted paths years ago and so migration of personal geodatabases to current Access platforms will not happen).
0 Kudos