I'm trying to delete a virtual field from a layer attribute table. The layer source is a Spatialite database so I know that it's not straightforward to remove permanent fields, but as I understand it virtual fields are stored in the project file, not the database. I followed the answer to this question, but when I try to edit the attribute table the 'Delete field' button remains greyed out:
UPDATE: I've now discovered that the above happens if the layer is added using Layer->Add Layer->Add Vector Layer
, but not if using ...->Add Spatialite Layer
, in which case a virtual field CAN be deleted using the appropriate button. I'm a relative beginner, and I hadn't realised it was possible to add Spatialite layers in 2 different ways.
However I'm still not clear if this is a bug, or actually correct behaviour, as I don't understand the difference between the two methods of adding layers (though this is probably a separate question).
Households
field is referenced in theRestricted Households
field, you have to delete that first.Restricted Households
with expression:CASE WHEN "delivery_point:access" IN ( 'restricted' , 'timed' ) THEN CASE WHEN "building:flats" <> NULL THEN "building:flats" WHEN "building" = 'house' THEN 1 END ELSE 0 END
Even with this single virtual field the 'Delete field' button is unavailable