Hello,
I am working on a shapefile within ArcGIS Pro 2.1. I am trying to use the field calculator to add a few fields to the populated one I created. However, I keep getting the error message of field is not nullable.
Can anyone tell me what I am doing wrong?
Thanks,
Derek
shapefile fields are not nullable
http://pro.arcgis.com/en/pro-app/tool-reference/appendices/geoprocessing-considerations-for-shapefile-output.htm
you have to use a featureclass in a file geodatabase if you need that capability
Thanks Dan. I had read that and was wondering if that was of issue. I did move it to a geodatabase at one point, but I think I was getting the same issue. I will try it again. A perplexing thing is that my calculations should be producing any nulls unless field calculator is treating 0+0+0 as null.
Moving to a geodatabase won't 'fix' the issue, you will probably have to create new fields since Alter Field only works on empty tables.
Moving from a shapefile to a geodatabase is sketchy at best if people haven't been careful to assign nulls in the shapefile properly.
0 (zero) is the default for numeric field... sadly 0 is a valid observation and a valid number, it is totally unsuitable as a null as is the <null> itself in my opinion.
Even in a geodatabase, you would be advised to use the largest or smallest integer possible for you operating system (ie 32 bit integers (min=-2147483648, max=2147483647, dtype=int32) and the same for float/doubles (min=-1.7976931348623157e+308, max=1.7976931348623157e+308, dtype=float64) It just kind of makes things obvious that they just aren't 'observations' or 'measurements'
What values do you have for city_ords, prohib_in_ and prohib_by_ for those records that yield the error?What field type do you have for those 3 input fields and the output field?
The values on those fields (both Long type) on are 0 or 1. I feel like I am doing something wrong with my calculate field statement. Like most folks, I am new to ArcGIS Pro. I added a new Long field to hold the results of the sum. Then I right-click on that new field and select Calculate Field. From there I put in the build up in the first input box following the new_field= something like !city_ords! + !county_ord!. I leave the default of Python 3 as the expression type. But, everything I get nulls in the result of the new field. I am able to get it to run in a geodatabase as Dan suggested, but the values are still null.
Out of curiosity:Is ESRI willing to improve functionalities applicable on shape files? Easy operations like alter field name, change attribute ordering, make field nullable, etc, should be straightforward, no? I have been ages waiting for this, so that importing and exporting to excel tables would finally be out of my daily business. cheers
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.