Hi Andreas,

in case of a relation 1:many you can use the /relation_aggregate/ function, something like:

/ 
relation_aggregate('test_n_318_fk_test1_7993_id','concatenate',//to_string(@id),',')/

where the first parameter is the ID of the relation.

Hope this helps...
Stefan

Am 29.11.2022 um 15:05 schrieb Andreas Neumann via QGIS-Developer:

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


_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer

--
Mit freundlichen Grüßen
Stefan Giese
Projektleiter/Consultant
----------------------
Where2B Konferenz 2022
15. Dezember 2022 in Bonn und Online
where2b-conference.com
-----------------------
WhereGroup GmbH
Schwimmbadstr. 2
79100 Freiburg
Germany

Tel.: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11

stefan.gi...@wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to