I would like to get a array with id's of all selected features of layer 'LayerB'
(field-name: "id_of_layerB"
) as a default-value in a qgis-attribute-form of 'LayerA'
.
I tried something like:
aggregate(layer:='LayerB',
aggregate:='array_agg',
expression:= "id_of_layerB",
is_selected('LayerB', ???)
)
but I have no idea how to realize this (especially what to put in in the "???"-part of the expression-part of the code.
I think, the "is_selected"
-function checks agains just one feature, but is there a way tho get ALL (one or more) selected features of 'LayerB'
?