<div dir="ltr">Hi,<div><br></div><div><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">I am looking for a way to implement conditional value mapping in QGIS. This means that the values available in attribute number 2 depend on the value provided in attribute 1.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">Example:</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">If the user enters "agriculture" in attribute 1, for attribute 2 only "corn" or "wheat" will be available.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">Instead, if the user enters "forest" in attribute 1, for attribute 2 only "pines" or "olives" will be available.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">And so on...</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">Apparently this is not doable just using the QGIS widget expression builder, but I am not sure. Here's a screencast to help visualize. The problem is that if for "class" I pick other than "Agri_Field", for the "color_aggri" attribute the same possible values appear.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)"><img src="http://i.stack.imgur.com/eqhY1.png" alt="enter image description here" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; max-width: 630px;"></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">Thanks in advance for any hints!</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)"><br></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">Regards,</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)"><br></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">Andre</p></div><div><br></div><div><br></div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">---------------------------------------------------------------<br><img src="https://1.bp.blogspot.com/-tUOfxWaFyQ8/UKN4jZdmLlI/AAAAAAAAA50/mMZ01ZDGCkI/s280/Logotipo-SHN-novo-02.gif" width="200" height="102"><br><br><span><font color="#999999"><b>Sociedade de História Natural</b><br><font>Departamento de Informa</font></font></span><span><font color="#999999"><font><span>ção Geográfica<br></span>Polígono Industrial do Alto do Amial<br>Pav.H02 e H06</font><br><br><a href="mailto:laboratorio@alt-shn.org" target="_blank">i.geografica<font color="#999999">@</font>alt-shn.org</a><br><a href="http://www.shn.pt" target="_blank">www.shn.pt</a><br><a href="http://www.alt-shn.blogspot.com" target="_blank">www.alt-shn.blogspot.com</a></font></span><div>
<span><font color="#999999"><a href="https://www.facebook.com/SociedadeDeHistoriaNatural?ref=hl" target="_blank">Facebook</a><br><br>TLM: <a value="+351964138188">964138188</a></font></span></div><br></div></div>
</div></div>