I have a project in Qgis where I have 2 layers: 1. plot of land (in the project named as "lohko") and 2. observation.
I have joined the id of the plot of land layer to the observation layer in the join section and have a relation widget on the observation layer that is connected to it. What I am trying to do is choose from a dropdown menu the id of the plot of land that the observation relates to and to make it easier, I would like to list only the plots of land that are located the nearest to the observation. For this, I have used the overlay_nearest
expression in the filter section as follows:
overlay_nearest(
'lohko',
filter:="tyyppi"='ohra',
limit:=2
)
When using this expression, if I set the limit to 0, it does what I expect it to do and lists none of the ids of the plots of field. However, when entering any other number, or even leaving it empty, in which case according to the explanation of the expression it should only list the nearest one, it gives all plots of land that I have in the project. Am I understanding this expression wrong, since when choosing the limit, I expected the expression to give the amount of id's that is the integer value written in it?