<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>You could try a "join attribute by location" followed by a
      "Aggregate"...</p>
    <p>Nicolas<br>
    </p>
    <div class="moz-cite-prefix">On 2022-01-26 3:43 a.m., Simon Dietmann
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:ae75bb0c-80e6-4d99-b588-9a18e51c5e37@pgnu.de">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span lang="EN-GB">Dear list,<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">I am trying to find a
            solution for the following problem with the model builder:<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">My model asks for two
            vector polygon layers that will be combined by ‘union’. The
            resulting layer gets a new field (field calculator) and is
            evaluated by ‘Statistics by categories’ algorithm. The
            fields for the categories are selected by the user when
            calling the model. Since those fields are present in the two
            separate input layers, I have to use two separate ‘Vector
            field’ inputs.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">The problem arises when
            I try to combine those two input variables to use them
            together for the ‘Statistics by categories’ algorithm.
            AFAICS there is no function inside the model builder to
            achieve this, so I suggest I have to export the model as  a
            python script. There I found that the call of the Statistics
            function gives the name of the variable as a parameter and
            not the variable itself:<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">alg_params = {<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">           
            'CATEGORIES_FIELD_NAME': parameters['fields'], ….<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">How can I combine my two
            lists (~like “parameters[‘fields’+’fields2’], or is there a
            way to do this inside the model builder that I didn´t find?<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Thanks in advance for
            help, kind regards<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal">Simon Dietmann<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:DE"><br>
            <br>
            Mit freundlichen Grüßen<br>
            im Auftrag<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;mso-fareast-language:DE"><br>
            Simon Dietmann<br>
          </span><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#999999;mso-fareast-language:DE">M.Sc.
            Physische Geografie<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#999999;mso-fareast-language:DE"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#999999;mso-fareast-language:DE">Aufgrund
            der aktuellen Situation bin ich zur Zeit vermehrt im Home
            Office tätig und dort erreichbar unter +49 69 – 57 80 56 98
            oder per Email, ich rufe Sie dann gerne zurück.<br>
            <br>
          </span><span style="mso-fareast-language:DE"><img
              style="width:2.1083in;height:.9083in" id="Bild_x0020_1"
              src="cid:part1.KAIFF8DJ.pgDCQj00@gmail.com" class=""
              width="202" height="87"></span><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#999999;mso-fareast-language:DE"><br>
            <br>
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#999999;mso-fareast-language:DE">PGNU
            Planungsgesellschaft Natur & Umwelt mbH<br>
            Amtsgericht Frankfurt am Main, HRB 111938<br>
            Geschäftsführer: Dr. Benjamin Hill, Johannes Christoph
            Kress, Alexander von Küchler<br>
            Hamburger Allee 45 +++ D-60486 Frankfurt am Main<br>
            Durchwahl: +49 (69) 95 29 64 - 75 +++ Fax: +49 (69) 95 29 64
            – 99<br>
            E-Mail: <a href="mailto:dietmann@pgnu.de"
              moz-do-not-send="true"><span style="color:#999999">dietmann@pgnu.de</span></a>
            +++ Web: <a href="http://www.pgnu.de/"
              moz-do-not-send="true"><span style="color:#999999">www.pgnu.de</span></a></span><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#999999;mso-fareast-language:DE"><br>
            <br>
          </span><span
style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#999999;mso-fareast-language:DE">>
            Diese E-Mail könnte vertrauliche und/oder rechtlich
            geschützte Informationen enthalten. Wenn Sie nicht der
            richtige Adressat sind oder diese E-Mail irrtümlich erhalten
            haben, informieren Sie bitte sofort den Absender und
            vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die
            unbefugte Weitergabe dieser Mail sind nicht gestattet.<br>
          </span><span
style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#999999;mso-fareast-language:DE"
            lang="EN-GB">> This e-mail may contain confidential
            and/or privileged information. If you are not the intended
            recipient (or have received this e-mail in error) please
            notify the sender immediately and destroy this e-mail. Any
            unauthorized copying, disclosure or distribution of the
            material in this e-mail is strictly forbidden.</span><span
            style="mso-fareast-language:DE" lang="EN-GB"><o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Nicolas Cadieux
<a class="moz-txt-link-freetext" href="https://gitlab.com/njacadieux">https://gitlab.com/njacadieux</a></pre>
  </body>
</html>