<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Dario,</p>
    <p>Could you try with 'Colore' and not "Colore" (pay attention to
      the simple vs double quotes)?</p>
    <p>Regards,</p>
    <p>Harrissou<br>
    </p>
    <div class="moz-cite-prefix">Le 18/05/2021 à 00:41, Dario C a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CALnfD8AK2JPAuDN-cKDQ45Noi9E-MK8nQAkiMQ+EbQkvFrSWjg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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"
            moz-do-not-send="true">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>
                                      <table
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"
                                        cellspacing="0" cellpadding="0">
                                        <tbody>
                                          <tr>
                                            <td style="padding:10px 0px
12px;width:160px;vertical-align:top" valign="top"><a
                                                href="https://spatialthoughts.com/"
style="background-color:transparent;color:rgb(51,122,183)"
                                                target="_blank"
                                                moz-do-not-send="true"><img
                                                  alt="Logo"
src="https://spatialthoughts685850346.files.wordpress.com/2019/12/spatial_thoughts_logo.png"
                                                  style="border: 0px;
                                                  vertical-align:
                                                  middle; width: 141px;
                                                  height: auto;"
                                                  moz-do-not-send="true"
                                                  width="141" border="0"></a></td>
                                            <td style="padding:6px
                                              0px;width:320px">
                                              <table
style="border-spacing:0px;border-collapse:collapse;background-color:transparent"
                                                cellspacing="0"
                                                cellpadding="0">
                                                <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" moz-do-not-send="true">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" moz-do-not-send="true"><img alt="LinkedIn icon"
src="https://codetwocdn.azureedge.net/images/mail-signatures/generator/elegant-logo/ln.png"
                                                          style="border:
                                                          0px;
                                                          vertical-align:
                                                          middle;
                                                          height: 20px;
                                                          width: 20px;"
moz-do-not-send="true" width="23" height="23" border="0"></a>  </span><span><a
href="https://twitter.com/spatialthoughts"
                                                          style="background-color:transparent;color:rgb(51,122,183)"
target="_blank" moz-do-not-send="true"><img alt="Twitter icon"
src="https://codetwocdn.azureedge.net/images/mail-signatures/generator/elegant-logo/tt.png"
                                                          style="border:
                                                          0px;
                                                          vertical-align:
                                                          middle;
                                                          height: 20px;
                                                          width: 20px;"
moz-do-not-send="true" width="23" height="23" border="0"></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"><br>
                                            </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" moz-do-not-send="true">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"
                moz-do-not-send="true">Qgis-user@lists.osgeo.org</a><br>
              List info: <a
                href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
                rel="noreferrer" target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
    </blockquote>
  </body>
</html>