Is there any way to evaluate a string as an expression in QGIS. For example, I want to evaluate the string in Column 'hukg' as an expression.

enter image description here

1 Answer 1



Function eval evaluates an expression which is passed in a string. Useful to expand dynamic parameters passed as context variables or fields.

  • I'd recommend making it more explicit by using eval('"hukg"') (double quotes for a column, and that in single quotes as a string). Commented Feb 22, 2022 at 21:10

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.