Feature request #16040
Filter relation reference widget by expressions
|Pull Request or Patch supplied:||No||Resolution:|
Relation reference widget does not allow to spatially filter potential related features. (that widget [[https://issues.qgis.org/attachments/9427/emeded_form_relationreferenz.jpg]] )
Filtering by expression instead of simple fields would allow to call functions such as
intersects( $geometry , geomFromWKT( $current_canvas_extent ))
That would allow a dropdown list reduced to a few neighbouring features. Currently it loads the whole layer, and can kill QGIS.
a native checkbox to filter by canvas would be also good for average users
#2 Updated by Matthias Kuhn 5 months ago
I would propose to solve this on a broader perspective (i.e. not only for the relation reference widget) and introduce a new "search feature(s)" widget that allows for searching features based on attributes or location. This widget would be opened with a separate button (like the select from canvas button now).
The combobox on the other hand shouldn't load all the options (if there are more than ~100 there is no longer any point in doing so) but have an autocompleter that works with requests on the data source and proposes matches based on this.