Can't use custom function to select by expression #24268
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Expressions
Related to the QGIS expression engine or specific expression functions
Author Name: Ian Turton (@ianturton)
Original Redmine Issue: 16358
Affected QGIS version: 2.18.3
Redmine category:expressions
I'm following this tutorial (http://www.qgistutorials.com/en/docs/custom_python_functions.html) on custom expressions and all goes well - my function shows up in the custom section and seems to work for the preview giving 21S for the first feature. When I extend the selection expression to GetUtmZone() = '21S' the output preview still says 1. But when I click on the select button no features are selected.
This works on 2.14.x but fails on 2.18.x.
Matthias Kuhn suggested adding usesgeometry=True to the decorator but that seems not to help.
Full discussion can be found at https://gis.stackexchange.com/questions/232006/cant-select-using-a-custom-function-in-qgis-2-18-3
The text was updated successfully, but these errors were encountered: