Calculate field not functioning

2870
6
04-07-2019 01:32 PM
ajkelsey
New Contributor III

For some reason, when I run the calculate field tool, it doesn't calculate the field. I was having success with this for quite a bit and it suddenly stopped working. 

I have a feature class that I have added fields to. All are Double and numeric. I take Field A and divide by Field B to enter result in Field C. However, after the calculation is done, the field remains <null>. 

Any insight would be appreciated.

I had total success with this method. However, I buggered my data and needed to start over. I am quite frustrated.

6 Replies
Egge-Jan_Pollé
MVP Regular Contributor

Hi,

Sounds like it should work, and - as you indicate - it did in the past. So, the trick now is to find out what has changed between 'now' and 'then'.

Questions:

  • What version of ArcGIS Pro are you using? Did you recently upgrade?
  • What format is your data in? Shapefile? FGDB?
  • Does the system give an error message?
  • Did you verify the syntax before running the calculate field? What is the result of this verification (with Verify😞 does it say it will run or does it already give an error?
  • And - last and also least - can you please (re)confirm that both input and output fields are indeed still numeric after you buggered your data and needed to start over?

Please let us know what you think.

HTH,

Egge-Jan

0 Kudos
DanPatterson_Retired
MVP Emeritus

You could also have a single record selected somewhere in the table.... calculations work on selected records so if it was successful and you have the selected record out of sight, you might not be able to see the result... hit  'clear' to remove selections and check the bottom left of the open table to make sure it show 0 of X selected prior to doing your calculation

ajkelsey
New Contributor III

I have the latest version of ArcGIS. Its been at least a week or two since the upgrade. All my work on this project was yesterday.

The file is FGDB.

No error message.

The tool runs and completes with no errors. It just doesn't enter results. 

My process was like this. I took an existing feature class and ran copy feature class so I could edit it without affecting the original. I then added new fields. After that, I ran calculate field. 

I did double check to make sure my fields were correct in the new feature.

I also checked to make sure I didn't have a single line highlighted. I even restarted ArcGIS several times.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Just ran a calc and it worked fine, so a screen grab of the table (and field contents) and calculator expression might be in order.

Everything sounds fine.  But seeing would assist in ruling out some of the other suggestions

Prior to putting in a call to Tech Support if all else fails try...

  • Repeating a calculation on another table, maybe even in another project using different data to rule out project and data issues

If that fails too

  • Windows Control Panel... Add Remove Programs, Select 'Repair'.  

If nothing changes and all is as described, file a case with tech support.d 

0 Kudos
ajkelsey
New Contributor III

The table is too big to show all of the fields. The expression is simple: !TotalAssmn! / !Acreage2!

I thought I had an idea of what happened so I was doing some testing and it seems to work randomly at this point.

0 Kudos
ajkelsey
New Contributor III

Ok. I loaded th eoriginal shapefile into a different project. Ran CopyFeatures and that turned it into FGDB. Added fields, calculated and it worked. 

0 Kudos