<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Andreas,</p>
    <p>in case of a relation 1:many you can use the <i>relation_aggregate</i>
      function, something like:</p>
    <p><i> relation_aggregate('test_n_318_fk_test1_7993_id','concatenate',</i><i>
        to_string(@id),',')</i><br>
    </p>
    <div class="moz-cite-prefix">where the first parameter is the ID of
      the relation.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Hope this helps...</div>
    <div class="moz-cite-prefix">Stefan</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Am 29.11.2022 um 15:05 schrieb Andreas
      Neumann via QGIS-Developer:<br>
    </div>
    <blockquote type="cite"
      cite="mid:fc3e9bf5223e4b66cb5eb6eb4c8aa990@carto.net">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Hi,</p>
      <p>I am looking for a way to find out the internal id of a related
        layer with a QGIS expression.</p>
      <p>@id and $id only work directly on the feature of the source
        layer, but not on related layers.</p>
      <p>attributes(<br>
           get_feature(<br>
              'Other Related Layer',<br>
              't_id',<br>
              fkey_value<br>
           )<br>
        )</p>
      <p>doesn't contain the internal id of the other layer ...</p>
      <p>Any ideas how to get access to internal ids of other layers?</p>
      <p>Thank you and greetings,</p>
      <p>Andreas</p>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
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

<a class="moz-txt-link-abbreviated" href="mailto:stefan.giese@wheregroup.com">stefan.giese@wheregroup.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.wheregroup.com">www.wheregroup.com</a>
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885</pre>
  </body>
</html>