[QGIS-Developer] QGIS expression to get internal ID of a feature in a related layer

Andreas Neumann a.neumann at carto.net
Tue Nov 29 06:05:39 PST 2022


Hi,

I am looking for a way to find out the internal id of a related layer 
with a QGIS expression.

@id and $id only work directly on the feature of the source layer, but 
not on related layers.

attributes(
    get_feature(
       'Other Related Layer',
       't_id',
       fkey_value
    )
)

doesn't contain the internal id of the other layer ...

Any ideas how to get access to internal ids of other layers?

Thank you and greetings,

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221129/981aee06/attachment.htm>


More information about the QGIS-Developer mailing list