Is there any way (plugin, or otherwise) to put a formula as the value of a field, which would then self-update as the other fields it is based on are adjusted? Exactly the way field-calculator updates the value of the field, but instead of having to go back to field-calculator every time, it could just work like a spreadsheet when the layers it depends on are updated.

For example, if I want to find the number of housing units inside a polygon, I can do something in field calculator like round("Density"*"Area"), but I have to redo it every time I adjust the polygon. When the calculations get more complicated it becomes a real hassle to manually go through and readjust manually.

1 Answer 1


Yes, this functionality is called virtual fields.

Open the field calculator and check the "virtual field" checkbox. The value will then be updated (or rather it is recalculated every time it is requested) based on changing attribute values or geometry.

Your Answer

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

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