<div dir="ltr">  Hi, thank you for your reply, but I still don't understand how to do... sorry<div><br></div><div>i tried to write this code in colour expression, but I don't understand what "value" is in get_feature

:</div><div><br></div><div>CASE<br>When<br>get_feature('V_TB_ATTIVITA_PT_NR',"Colore",'N')='N' then color_rgb (0,0,0)<br>When<br>get_feature('V_TB_ATTIVITA_PT_NR',"Colore",'R')='R' then color_rgb (255,0,0)<br>END<br></div><div><br></div><div>Consider that I have a virtual field called "Colore" where I have 'N' or 'R' in case it is black or red color.</div><div><br></div><div>Thank you for your kind availability.</div><div><br></div><div>cheers</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 17 mag 2021 alle ore 09:09 Ujaval Gandhi <<a href="mailto:ujaval@spatialthoughts.com">ujaval@spatialthoughts.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">You can select the layer under 'Plot Parameters' and its attributes will be available in the expression. (see attached screenshot).<div><br></div><div>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.<br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div></div><div><table cellpadding="0" cellspacing="0" style="border-spacing:0px;border-collapse:collapse;color:rgb(68,68,68);width:480px;font-size:10pt;font-family:Arial,sans-serif;line-height:normal"><tbody><tr><td valign="top" style="padding:10px 0px 12px;width:160px;vertical-align:top"><a href="https://spatialthoughts.com/" style="background-color:transparent;color:rgb(51,122,183)" target="_blank"><img border="0" alt="Logo" width="141" src="https://spatialthoughts685850346.files.wordpress.com/2019/12/spatial_thoughts_logo.png" style="border: 0px; vertical-align: middle; width: 141px; height: auto;"></a></td><td style="padding:6px 0px;width:320px"><table cellpadding="0" cellspacing="0" style="border-spacing:0px;border-collapse:collapse;background-color:transparent"><tbody><tr><td style="padding:0px;font-size:12pt;font-family:Arial,sans-serif;font-weight:bold;color:rgb(61,60,63)"><span style="color:rgb(0,175,239)">Ujaval Gandhi</span></td></tr><tr><td style="padding:0px 0px 11px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(61,60,63)"><span style="color:rgb(0,175,239)">Spatial Thoughts</span></td></tr><tr><td style="padding:0px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(155,155,155)"><span>mobile: +91-8095684687</span></td></tr><tr><td style="padding:0px;font-size:10pt;font-family:Arial,sans-serif;color:rgb(155,155,155)"><span>email: </span><span style="color:rgb(23,147,210)"><a href="mailto:ujaval@spatialthoughts.com" target="_blank">ujaval@spatialthoughts.com</a></span></td></tr><tr><td style="padding:6px 0px 0px"><span style="display:inline-block;height:22px"><span><a href="https://www.linkedin.com/in/spatialthoughts/" style="background-color:transparent;color:rgb(51,122,183)" target="_blank"><img alt="LinkedIn icon" border="0" width="23" height="23" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator/elegant-logo/ln.png" style="border: 0px; vertical-align: middle; height: 20px; width: 20px;"></a>  </span><span><a href="https://twitter.com/spatialthoughts" style="background-color:transparent;color:rgb(51,122,183)" target="_blank"><img alt="Twitter icon" border="0" width="23" height="23" src="https://codetwocdn.azureedge.net/images/mail-signatures/generator/elegant-logo/tt.png" style="border: 0px; vertical-align: middle; height: 20px; width: 20px;"></a>  </span></span></td></tr></tbody></table></td></tr><tr><td colspan="2" style="padding:8px 0px 0px;border-top:1px solid rgb(23,147,210);width:480px;font-family:Arial,sans-serif;color:rgb(155,155,155);text-align:justify"></td></tr></tbody></table><br></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 17, 2021 at 2:47 AM Dario <<a href="mailto:dario955i@gmail.com" target="_blank">dario955i@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi,<div><br></div><div>I should get some data from a specific field of a specific layer but I’m stuck.</div><div><br></div><div>I’m using “Data Ploty” plug-in and I’d like to customise the colour of the chart using expression. </div><div>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.</div><div>I’d like to write something like that but, of course, selecting the correct layer:</div><div><br style="color:rgb(0,0,0);font-family:"Exo 2",sans-serif;font-size:15px;background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0);font-family:"Exo 2",sans-serif;font-size:15px;background-color:rgb(255,255,255)"><span style="font-family:"Courier New"">CASE</span></span><br style="color:rgb(0,0,0);font-family:"Exo 2",sans-serif;font-size:15px;background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0);font-family:"Exo 2",sans-serif;font-size:15px;background-color:rgb(255,255,255)"><span style="font-family:"Courier New"">WHEN "Civici" = 'Neri' THEN color_rgb(0,0,0)</span></span><br style="color:rgb(0,0,0);font-family:"Exo 2",sans-serif;font-size:15px;background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0);font-family:"Exo 2",sans-serif;font-size:15px;background-color:rgb(255,255,255)"><span style="font-family:"Courier New"">ELSE color_rgb (255,0,0)</span></span><br style="color:rgb(0,0,0);font-family:"Exo 2",sans-serif;font-size:15px;background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0);font-family:"Exo 2",sans-serif;font-size:15px;background-color:rgb(255,255,255)"><span style="font-family:"Courier New"">END</span></span></div><div><br></div><div><br></div><div>Thank you in advance.</div><div><br></div><div>Cheers</div><div><div><br><div dir="ltr">_</div></div></div></div>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>
</blockquote></div>