[Qgis-user] Select data from a specific layer

Delaz J delazj at gmail.com
Mon May 17 16:05:49 PDT 2021


Hi Dario,

Could you try with 'Colore' and not "Colore" (pay attention to the 
simple vs double quotes)?

Regards,

Harrissou

Le 18/05/2021 à 00:41, Dario C a écrit :
>   Hi, thank you for your reply, but I still don't understand how to 
> do... sorry
>
> i tried to write this code in colour expression, but I don't 
> understand what "value" is in get_feature :
>
> CASE
> When
> get_feature('V_TB_ATTIVITA_PT_NR',"Colore",'N')='N' then color_rgb (0,0,0)
> When
> get_feature('V_TB_ATTIVITA_PT_NR',"Colore",'R')='R' then color_rgb 
> (255,0,0)
> END
>
> Consider that I have a virtual field called "Colore" where I have 'N' 
> or 'R' in case it is black or red color.
>
> Thank you for your kind availability.
>
> cheers
>
> Il giorno lun 17 mag 2021 alle ore 09:09 Ujaval Gandhi 
> <ujaval at spatialthoughts.com <mailto:ujaval at spatialthoughts.com>> ha 
> scritto:
>
>     You can select the layer under 'Plot Parameters' and its
>     attributes will be available in the expression. (see attached
>     screenshot).
>
>     If you need to get the attribute from another layer, you can use
>     the get_feature() function to get feature from another layer by
>     specifying the layer name.
>     Logo <https://spatialthoughts.com/> 	
>     Ujaval Gandhi
>     Spatial Thoughts
>     mobile: +91-8095684687
>     email: ujaval at spatialthoughts.com <mailto:ujaval at spatialthoughts.com>
>     LinkedIn icon <https://www.linkedin.com/in/spatialthoughts/>
>     Twitter icon <https://twitter.com/spatialthoughts>
>
>
>
>
>
>     On Mon, May 17, 2021 at 2:47 AM Dario <dario955i at gmail.com
>     <mailto:dario955i at gmail.com>> wrote:
>
>         Hi,
>
>         I should get some data from a specific field of a specific
>         layer but I’m stuck.
>
>         I’m using “Data Ploty” plug-in and I’d like to customise the
>         colour of the chart using expression.
>         As I’m working on layout I can’t see any field into expression
>         menu, so I need to call a specific layer and then the field.
>         I’d like to write something like that but, of course,
>         selecting the correct layer:
>
>         CASE
>         WHEN "Civici" = 'Neri' THEN color_rgb(0,0,0)
>         ELSE color_rgb (255,0,0)
>         END
>
>
>         Thank you in advance.
>
>         Cheers
>
>         _
>         _______________________________________________
>         Qgis-user mailing list
>         Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>         List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>         <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>         Unsubscribe:
>         https://lists.osgeo.org/mailman/listinfo/qgis-user
>         <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>
>
> _______________________________________________
> 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/20210518/02df0c69/attachment.html>


More information about the Qgis-user mailing list