I have a no-geometry layer 'pictures' linked to several different parent layers. This means the project can have multiple photos attached to a point and all the photos for the project can be viewed at once within QGIS alongside their attributes.
I am trying to figure out if I can automatically add the source layer name to the pictures in the child layer. E.g. If 'Layer 1' is the parent and I take attach a photo to it via the relationship with 'pictures' then it will automatically fill in a field on the 'pictures' layer with 'Layer 1'.
I understand that I can use get_feature to target a map layer and then extract a value from the parent layer this way but is there any other way of accessing the parent layer that would allow me to pull the layer name instead?