[Qgis-user] Editor Doesn't Save New Values in Shapefile

Lee Hachadoorian Lee.Hachadoorian+L at gmail.com
Mon Nov 5 20:16:24 PST 2012


On 11/05/2012 01:35 PM, Lee Hachadoorian wrote:
> Strange problem with editing attribute tables. I've used the field
> calculator to create a new column, calculate a percentage as
>
> (1.0 * "column1" / "column2") * 100.0
>
> The field calculation works. Then when I save the edits (using either
> direct save, or toggle editing off and choose Save when prompted) all
> of the values in the new field become NULL.
>
> I and a colleague have tested this on two OSes (Linux and Mac) using
> two different shapefiles, representing different geographies but with
> the same attribute table.
>
> Any ideas?
>
> Regards,
> --Lee
Tested this a few more times and kept reproducing the error. Then I

(a) created a new field
(b) saved the shapefile layer and toggled editing off
(c) toggled editing on
(d) used field calculator to update previously created field
(e) saved the layer

In this case, it worked. So it seemed like the problem was that using 
the field calculator to create a new field and calculate at the same 
time was the problem, BUT, after following the above procedure, I can no 
longer reproduce the error.

Has anyone else observed this behavior?

--Lee



More information about the Qgis-user mailing list