[Qgis-user] Rule Based Symbology with aggregate Function

Stefan Giese Stefan.Giese at wheregroup.com
Mon Dec 16 06:06:14 PST 2019


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.giese at wheregroup.com
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.lindauer at sz.ch <mailto:juerg.lindauer at sz.ch>
>
> Internet: www.sz.ch/landwirtschaft <http://www.sz.ch/landwirtschaft>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20191216/1d11b501/attachment.html>


More information about the Qgis-user mailing list