0

I have in QGIS 3.28.8 two point layers: source_p and target_p I want in source_p layer to create a dropdown to "TargetFID" field with Value Relation to target_p layer with only 3 nearest points matches on target_p layer. Value relation should activate when I select a singel point at source_p layer ... current_value selected I tried to filter expression, but something is wrong?

overlay_nearest(layer:='target_p', expression:="fid", limit:=3, max_distance:=15000)

enter image description here

2
  • So I'm not entirely sure from the question what is happening, but it seems to me the problem might be in the fact that you are using this tool without some kind of spatial relationship. Generally, the value relation tool seems to be used for field relationships. I personally would run your two layers first through a spatial join and then use the fields generated for my widget. Commented Jul 26, 2023 at 17:30
  • I have the same problem gis.stackexchange.com/questions/426242/… ... when typing the expression i can even see the correct values but they are not visible in the form view ??
    – Rii Pii
    Commented Aug 2, 2023 at 17:05

1 Answer 1

0

I', happy with that solution ... it will create dropdown where are only points with range to 30000 meters.

intersects($geometry, buffer(@current_geometry, 30000))

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.