I want to create an algorithm with the graphical modeler in QGIS 3.0.3 where i define one Vector Layer and a Vector Field from this Layer as my inputvariables. Then i want to access the field-values in the field calculator. For example: formula in fieldcalculator:

($area/1000000) * INPUT_FIELD

But this won't work. The fieldcalculator doesn't know or can't access the field values.

When i use an algorithm and define the INPUT_FIELD as an input-variable it works, but i can't access the field-values in the calculator.

How can i acess the field-values from my input Vector Field in the fieldcalculator?

1 Answer 1


I found that, in QGIS 3.4 at least, QGIS is touchy with parenthesis and spaces

This should work:

( $area / 1000000 ) * INPUT_FIELD

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.