QGIS – Check Parent Layer Name

mergin-mapsqgisrelationship-class

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?

Best Answer

To attach multiple photos to a single feature, you can read the official documentation. The solution is based on 1:N QGIS relation with UUID fid field. Mergin Maps has unique widget in the mobile app to display gallery of your attached pictures.

Related Question