<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><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 Definitions */
@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;}
/* Style Definitions */
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;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
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]--></head><body lang=DE link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><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 width=202 height=87 style='width:2.1083in;height:.9083in' id="Bild_x0020_1" src="cid:image001.jpg@01D81295.76650A70"></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"><span style='color:#999999'>dietmann@pgnu.de</span></a> +++ Web: <a href="http://www.pgnu.de/"><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 lang=EN-GB style='font-size:8.0pt;font-family:"Arial",sans-serif;color:#999999;mso-fareast-language:DE'>> 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 lang=EN-GB style='mso-fareast-language:DE'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p></div></body></html>