3

I'm working with ArcGIS 10.2 for Desktop and OS Windows 7.

I need to set numeric vales from Zero back to NULL, but I can't from the field calculator.

I'm working with a vector file and I need to display NULL in one column that shows 0 (Zero) as default value.

-------- Edit-------
I am adding the error messages that he received Error Message 1
Translation: An error occurred during the process. Please consult the Geoprocessing Results Window to obtain more details.
Geoprocessing Results Window
Error at bottom, translation: The values ​​of the selected column can not be set to null because the field in the database is defined as "Not Null".

1
  • Is it a shape file or a geodatabase feature class? I do not believe shapefile support null values.
    – Zipper1365
    Nov 22, 2018 at 1:27

4 Answers 4

10

Assuming you are using ArcGIS, and not QGIS, this is a simple operation. It definitely can be performed in the Field Calculator. I created a field, "test_num", type of Double as an example. This is in ArcGIS 10.2 on Windows 7, 64bit.

Source Table - Data set to 0 Source Data

Field Calculator: Simply enter NULL as the value to be calculated. Field Calculator - NULL

Result Table - Selected values are now <Null> Result Table - Values set to NULL

--------- Edit -----------
Based on the additional screenshots you provided, the issue is clear. You cannot set the values to NULL because you have specified that this column Cannot have NULL values.

Your best bet is to create another column that allows Nulls, and try this operation again. If you are still finding an error, please modify your question with additional information.

8
  • I have tried that but is not working, it says something about an error ocurring while the calc was processing the data :( Aug 21, 2014 at 20:44
  • 2
    If you are receiving an error message, that is the sort of information that is extremely useful to provide when asking a question. If you don't, then people go on the assumption that you haven't tried the basic processes. The more detailed you make your question with regard to what you have tried and what didn't work, the more likely you are to receive an answer that actually addresses your problem. Please edit your question to include information about the error message. A screen shot would be ideal. Aug 21, 2014 at 20:47
  • 3
    There are people on this site from all over the world. If you post the error message as a screenshot and it is in Spanish, then also enter text below it with an English translation. That would cover all your bases. Obviously there is something we are missing as you are getting an error when you are trying the solutions that people suggest. Aug 21, 2014 at 20:54
  • 1
    @EdixonGutierrez The answers here all relate to ArcGIS so I think you should edit your question here so that it only relates to ArcGIS for Desktop. Then if you also need an answer for QGIS please research whether that has already been answered here first, and if not, then ask that as a new question.
    – PolyGeo
    Aug 21, 2014 at 21:23
  • 1
    The error messages provided all the information you needed to solve the problem. You cannot set values to Null, if the column is set to NOT accept Null values. I modified my answer to reflect as much. Aug 21, 2014 at 21:44
9

You can do this directly in the field calculator.

enter image description here

9
  • 3
    I am confused, you make no mention of QGIS in your post??
    – Aaron
    Aug 21, 2014 at 20:34
  • 2
    No problem, I would recommend asking a separate question relating to QGIS. Does the answer that I gave you work for ArcGIS?
    – Aaron
    Aug 21, 2014 at 20:40
  • 1
    Great, I am still confused why none of these answers are working for you in ArcGIS. Are you getting error messages or encountering some other issue?
    – Aaron
    Aug 21, 2014 at 20:47
  • 3
    When @Aaron recommended asking a separate question, I am going to assume he meant creating a new question related to setting a field to null in QGIS. This is different than editing your existing ArcGIS related question to include something about a different software package. This site provides the best results when the questions are focused, both in topic and application, and provide as much detail as possible. I second his recommendation to make a new question about setting fields to null in QGIS, and including what you have already tried in that regard. Aug 21, 2014 at 20:52
  • 1
    Based on your edits, it appears you will have to write the results to a new field because your field is not configured to accept null values.
    – Aaron
    Aug 21, 2014 at 22:37
3

Create a new integer field. Then calculate your existing field with the newly created one.

enter image description here

1
3

As shown in the image below...

-Select the records you want to null

-In Field Calculator, set the Parser to "Python"

-Type (case sensitive): None

-Click OK

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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