<html><head></head><body><div class="ydp58c37222yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div dir="ltr" data-setdir="false">Thank you very much Osin!</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">With the example that you kindly provided is more clear. I will try it and again, thank you very much!</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Regards.</div><div><br></div><div class="ydp58c37222signature"><br></div></div><div><br></div>
        
        </div><div id="ydpbfcc5048yahoo_quoted_6327099102" class="ydpbfcc5048yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                        El martes, 14 de mayo de 2024, 13:52:16 GMT-6, oisin.kelly.wild@gmail.com <oisin.kelly.wild@gmail.com> escribió:
                    </div>
                    <div><br></div>
                    <div><br></div>
                
                
                <div><div id="ydpbfcc5048yiv5189371883"><div><div>get_feature(layer, attribute, value)<br clear="none"><br clear="none"></div>
<div>This returns a feature. You can then wrap this in attributes() to return a dictionary of attribute names and  values.<br clear="none"><br clear="none"></div>
<div>You then add ['attributename'] on end to return value.<br clear="none"><br clear="none"></div>
<div>So for each table <br clear="none"></div>
<div> something like<br clear="none"><br clear="none"></div>
<div>attributes(get_feature('table1', 'common-id-name', "common-id-name"))['H3centr-h9...']<br clear="none"><br clear="none"></div>
<div>Does this make sense<br clear="none"><br clear="none"></div>
<div>Oisin<br clear="none"><br clear="none"><br clear="none"></div>
<div>Get BlueMail for Android </div>
<div id="ydpbfcc5048yiv5189371883yqtfd52865" class="ydpbfcc5048yiv5189371883yqt1450102861"><div class="ydpbfcc5048yiv5189371883gmail_quote">On 14 May 2024, at 20:35, Guillermo Parra <<a shape="rect" href="mailto:meminp_24@yahoo.com" rel="nofollow" target="_blank">meminp_24@yahoo.com</a>> wrote:<blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex;" class="ydpbfcc5048yiv5189371883gmail_quote">
<div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;" class="ydpbfcc5048yiv5189371883ydp6701ce81yahoo-style-wrap">
 <div>
  <div dir="ltr">
   Hello Oisin,
  </div>
  <div dir="ltr">
   <br clear="none">
  </div>
  <div dir="ltr">
   Thank you for your guidance regarding this topic, and I am sorry if I need further assistance, but I'm kind of new to QGIS.
  </div>
  <div dir="ltr">
   <br clear="none">
  </div>
  <div dir="ltr">
   Regarding the need to define the layer for each attribute, will it work if I stated like I had wroten before? i.e.:
  </div>
  <div dir="ltr">
   <div>
    <div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;color:rgb(0, 0, 0);outline:none !important;">
     'Table1.H3centr_h9_cobcubierto'  = 1 OR 
    </div>
    <div dir="ltr" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;color:rgb(0, 0, 0);outline:none !important;">
     'Table2.H3centr_h9_cobcubierto' = 1 
    </div>
   </div>Will QGIS recognize it?
  </div>
  <div dir="ltr">
   <br clear="none">
  </div>
  <div dir="ltr">
   And to find the comparable record, certaingly I can use a common id. So I will explore the getfeature( ) tool that you suggest, thank you very much.
  </div>
  <div dir="ltr">
   <br clear="none">
  </div>
  <div dir="ltr">
   Regards.  
  </div>
  <div dir="ltr">
   <br clear="none">
  </div>
  <div>
   <br clear="none">
  </div>
  <div class="ydpbfcc5048yiv5189371883ydp6701ce81signature">
   Guillermo Parra Montealegre e-mail: meminp_24@yahoo.com
  </div>
 </div>
 <div>
  <br clear="none">
 </div>
 <div>
  <br clear="none">
 </div>
</div>
<div id="ydpbfcc5048yiv5189371883ydp8772f26dyahoo_quoted_6462001013" class="ydpbfcc5048yiv5189371883ydp8772f26dyahoo_quoted">
 <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
  <div>
   El martes, 14 de mayo de 2024, 13:23:07 GMT-6, oisin.kelly.wild@gmail.com <oisin.kelly.wild@gmail.com> escribió:
  </div>
  <div>
   <br clear="none">
  </div>
  <div>
   <br clear="none">
  </div>
  <div>
   <div id="ydpbfcc5048yiv5189371883ydp8772f26dyiv9615049115">
    <div>
     <div>
      You definitely need to define the layer for each attribute (except the current layer).
      <br clear="none">
      <br clear="none">
     </div>
     <div>
      You also need a way to find the comparable record, e.g.
      <br clear="none">
     </div>
     <div>
      (i) with a common id (use getfeature() to access attribute) or
      <br clear="none">
     </div>
     <div>
      (ii) spatially use one of the overlay functions.
      <br clear="none">
      <br clear="none">
     </div>
     <div>
      Oisin
      <br clear="none">
      <br clear="none">
     </div>
     <div>
      Get BlueMail for Android
     </div>
     <div class="ydpbfcc5048yiv5189371883ydp8772f26dyiv9615049115gmail_quote">
      On 14 May 2024, at 19:52, Guillermo Parra via QGIS-User <<a shape="rect" href="mailto:qgis-user@lists.osgeo.org" rel="nofollow" target="_blank">qgis-user@lists.osgeo.org</a>> wrote:
      <blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex;" class="ydpbfcc5048yiv5189371883ydp8772f26dyiv9615049115gmail_quote">
       <div id="ydpbfcc5048yiv5189371883ydp8772f26dyiv9615049115yqt63110" class="ydpbfcc5048yiv5189371883ydp8772f26dyiv9615049115yqt5862070833">
        <div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;" class="ydpbfcc5048yiv5189371883ydp8772f26dyiv9615049115ydpd4979106yahoo-style-wrap">
         <div>
          <div dir="ltr">
           Hi,
          </div>
          <div dir="ltr">
           <br clear="none">
          </div>
          <div dir="ltr">
           I have several tables with the same fields, same grid information, but different field data for each one (information from different providers, let's say).
          </div>
          <div dir="ltr">
           <br clear="none">
          </div>
          <div dir="ltr">
           Particularly, I have a field with 0 and 1 which represent if each provider have, or not have coverage in that area.
          </div>
          <div dir="ltr">
           <br clear="none">
          </div>
          <div dir="ltr">
           I want to compare the values of each table to set "1" if at least one of the providers have coverage in each area, or "0" if None of them have it, so I used the field calculator and the expression builder with this sql statement:
          </div>
          <div dir="ltr">
           <br clear="none">
          </div>
          <div dir="ltr">
           <div>
            <div>
             if( 'H3centr_h9_cobcubierto'  = 1 OR 
            </div>
            <div>
             'H3centr_h9_cobcubierto' = 1 OR
            </div>
            <div>
             'H3centroides_h9_cobGT3D cubierto' = 1 OR
            </div>
            <div>
             'H3centroides_h9_cob_cubierto'  = '1' OR
            </div>
            <div>
             'H3centr_h9_cob_cubierto' = '1' OR
            </div>
            <div>
             'H3cent_cob_cubierto'  = '1' OR
            </div>
            <div>
             "H3centrR9_Tc3D_cubierto"  ='1', 1, 0)
            </div>
           </div>
           <br clear="none">
          </div>
          <div dir="ltr">
           The problem is that apparently it is considering only the last field in double quotes (which is in the same table that the new column where I want to fill the data), and the other fields apparently are beign ignored.
          </div>
          <div dir="ltr">
           <br clear="none">
          </div>
          <div dir="ltr">
           I would guest that it would be better to specify the table and field where each data will be taken ( like  
           <div>
            <div style="color:rgb(0, 0, 0);font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
             if( 'Table1.H3centr_h9_cobcubierto'  = 1 OR 
            </div>
            <div dir="ltr" style="color:rgb(0, 0, 0);font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
             'Table2.H3centr_h9_cobcubierto' = 1 OR... etc.)
            </div>
           </div>
           <div dir="ltr" style="color:rgb(0, 0, 0);font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
            but when I make double click over each layer field, QGIS writes it that way, so I asume it is correct.
           </div>
           <div dir="ltr" style="color:rgb(0, 0, 0);font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
            <br clear="none">
           </div>
           <div dir="ltr" style="color:rgb(0, 0, 0);font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
            So, if someone have an idea on how I can make it work, I would greatly appreciate any suggestion.
           </div>
           <div dir="ltr" style="color:rgb(0, 0, 0);font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
            Thanks,
           </div>
           <div dir="ltr" style="color:rgb(0, 0, 0);font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
            <br clear="none">
           </div>
          </div>
          <div dir="ltr">
           Guillermo.
          </div>
          <div dir="ltr">
           <br clear="none">
          </div>
          <div>
           <br clear="none">
          </div>
          <div class="ydpbfcc5048yiv5189371883ydp8772f26dyiv9615049115ydpd4979106signature">
           Guillermo Parra Montealegre e-mail: meminp_24@yahoo.com
          </div>
         </div>
        </div>
       </div>
       <pre class="ydpbfcc5048yiv5189371883ydp8772f26dyiv9615049115blue"></pre>
       <hr>
       <br clear="none">
       QGIS-User mailing list
       <br clear="none">
       QGIS-User@lists.osgeo.org
       <br clear="none">
       List info: <a shape="rect" href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="nofollow" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
       <br clear="none">
       Unsubscribe: <a shape="rect" href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="nofollow" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
       <br clear="none">
      </blockquote>
     </div>
    </div>
   </div>
  </div>
 </div>
</div></blockquote></div></div></div></div></div>
            </div>
        </div></body></html>