Hi Stefan The IN operator didn't like arrays. But i've found the solution.
array_contains( string_to_array( aggregate( layer:='alpperimeter20190607152251688', aggregate:='concatenate', expression:= pk , filter:=selected = '1', concatenator:=char(44))), attribute( $currentfeature , 'id_alpperimeter')) = true Now i get the expected feature in the rule based symbology. Thanks, Juerg Von: Stefan Giese <stefan.gi...@wheregroup.com> Gesendet: Montag, 16. Dezember 2019 15:06 An: Jürg Lindauer <juerg.linda...@sz.ch>; 'qgis-user@lists.osgeo.org' <qgis-user@lists.osgeo.org> Betreff: Re: [Qgis-user] Rule Based Symbology with aggregate Function Hi Jurg, you need to make an array first, your statement should be: "id_alpperimeter" IN string_to_array((aggregate( layer:='alpperimeter20190607152251688', aggregate:='concatenate', expression:= "pk" , filter:=selected = '1', concatenator:=concat( char(39), char(44), char(39))))) Mit freundlichen Grüßen Stefan Giese Projektleiter/Consultant ********************************************* Das WhereGroup-Team wünscht Ihnen ein frohes Weihnachtsfest und ein glückliches Jahr 2020! ********************************************* WhereGroup GmbH Schwimmbadstr. 2 79100 Freiburg Germany Fon: +49 (0)761 / 519 102 - 61 Fax: +49 (0)761 / 519 102 - 11 stefan.gi...@wheregroup.com<mailto:stefan.gi...@wheregroup.com> www.wheregroup.com<http://www.wheregroup.com> Geschäftsführer: Olaf Knopp, Peter Stamm Amtsgericht Bonn, HRB 9885 Am 16.12.2019 um 14:54 schrieb Jürg Lindauer: Hi I'm trying to create a rule based symbology with "id_alpperimeter" IN (aggregate( layer:='alpperimeter20190607152251688', aggregate:='concatenate', expression:= "pk" , filter:=selected = '1', concatenator:=concat( char(39), char(44), char(39)))) But there are no results in there. The rule based Symbology is ok, when i write the list directly: "id_alpperimeter" IN ('258eef41-8120-45a5-a3d9-6ceae1e98e42', 'a882577f-eee2-4191-aa3b-2c4635bac70b') The aggregate function alone gives me the expected list: aggregate( layer:='alpperimeter20190607152251688', aggregate:='concatenate', expression:= "pk" , filter:=selected = '1', concatenator:=concat( char(39), char(44), char(39))) Result: '258eef41-8120-45a5-a3d9-6ceae1e98e42', 'a882577f-eee2-4191-aa3b-2c4635bac70b' What i'm doing wrong? Isn't possible to connect the 'IN' Operator with the aggreagte Function? I'm using QGIS 3.4.11 Regards, Juerg Lindauer Amt für Landwirtschaft Abt. Agrarmassnahmen und Bodenrecht Hirschistrasse 15 Postfach 5182 6431 Schwyz Telefon: 041 819 15 17 E-Mail: juerg.linda...@sz.ch<mailto:juerg.linda...@sz.ch> Internet: www.sz.ch/landwirtschaft<http://www.sz.ch/landwirtschaft> _______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user