0

I have a table with over 19000 points. One of the attributes of each point is either 0 or 1. However, there are 7 points with NULL. I would like to change these NULL to 1's.

When I open the Attribute Table and manually change the values, I can't save my changes. Every Save button is greyed-out. Therefore when I refresh all the values have reverted to their original ones.

How can I fix this? Or is there another way to do it? (I'm using ArcGIS Pro 2.9,1.)

Edit: I have tried the "Calculate Field" tool. Unfortunately, I get the following error: AttributeError: 'NoneType' object has no attribute 'replace'.

The table wasn't open or being edited anywhere else.

I managed to circumvent the problem by just loading and changing the data in Qgis and then exporting it.

9
  • Have you tried using the "Calculate Field" tool instead of manually replacing the values?
    – ChloeG
    Commented Mar 2, 2022 at 15:59
  • This can happen if the table is open elsewhere and being edited. Is this a shapefile, feature class, or something else? Commented Mar 2, 2022 at 16:12
  • It is a geopackage. I don't have it open anywhere else.
    – Niek
    Commented Mar 2, 2022 at 17:19
  • I have tried the "Calculate Field" tool. Unfortunately, I get the following error: AttributeError: 'NoneType' object has no attribute 'replace'.
    – Niek
    Commented Mar 2, 2022 at 17:30
  • 1
    Your last sentence appears to be an answer, rather than part of the question.
    – Matt
    Commented Mar 5, 2022 at 1:23

4 Answers 4

0

You could try selecting the attributes by going to the Map Tab, "Select By Attributes" after that go to the Edit tab opening the "Attributes" Menu under Selection and editing the attributes there.

0

I found a workaround If you keep the editing fields table open and then in the table on the top ribbon click add a new field. A message will pop up asking if you want to save or delete edits. There you can save your edits.

1
  • selecting another record in the table also sometimes wakes up the save button.
    – danak
    Commented Dec 11, 2023 at 19:20
0

Attribute Table -> Calculate Field (Python)

1 if !field_name! is None else !field_name!
0

This would occur if the dataset was locked or in use somewhere else. This has caused me pain in the past. I would suggest clearing all selections, closing all ArcGIS Pro windows, saving your document, then re-opening it. Then when you re-open, don't do anything but go straight to those records, edit them, then save them.

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