With QGIS 3.28 I have a point layer (boreholes) . And I have a polygonal layer (departments/districts). My goal would be to via QGIS (right click boreholes point layer -> attributes form) to automatically fill the "department" field of the boreholes layer. The filling would be done via spatial intersection. The field of the departments table that I would like to retrieve is called "nom_dep".
I am attaching a screenshot of my settings. For the "layer" parameter, I filled the department layer For the "key column" parameter, I entered the primary key (gid) of the department column For the parameter column of values, I put the field "nom_dep" from the table of departments
I didn't fill in anything for the "Column description" parameter.
In the "Filter expression" section I filled like that:
aggregate( layer:='AdminExpressDept_AOI_Po_20210331', aggregate:='concatenate_unique', expression:=attribute('dep_name'), concatenator:=',', filter:=intersects(geometry(@parent), $geometry))
I have no error message. But it does not work. I do not see the values of departments entered in the field of the table of boreholes. Did I make a mistake? Should another QGIS filter expression be used?