<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div>Hello all!<br><br></div>I have a simple problem but I think it deserves a rather complex solution. I'd like to ask you about the best way to accomplish what I want.<br>
<br></div><b><font size="4">Problem</font></b><br></div>I will provide my customers with a QGIS project composed of several buildings. Customers can access the project only through web navigator (LizMap web client), and they will be able to edit the values of certain fields for each building.<br>
<br></div>Each building has one main usage (for instance, A, B, C) and one secondary usage (for instance A1, A2, B1, B2, B3, C1, C2). The secondary usage depends on the main one. I.e., main usage A can only be associated with secondary usages starting with 'A' letter.<br>
<br></div>At the early stages, the QGIS project won't have information about which building associates to wich usage. I mean, I have the list of available main and secondary usages but not associated with the buildings inside the project. It's the customer responsibility to edit each building and assign a main and secondary usage to it.<br>
</div><br></div>So I'd like to provide to my customers with a combo box containing all available main usages of buildings and they'll have to click on each building and, in the pop-up window, select the appropriate main usage.<br>
<br></div><div>But then they'll have to have at their disposal, for the secondary usages, only the appropriate ones, not all the secondary usages listing.<br><br></div><div><b><font size="4">Solutions</font></b><br></div>
I know I can use widgets for displaying combo boxes through web clients but I don't know how to implement the relationship between main and secondary usages. I have a table (not a GIS table) in PostgreSQL containing all available main-secondary usages relationships, but I'm not able to use this table in QGIS, When selecting "Value map" type of widget (layer properties > fields > widgets), I can select other layers for building the combo values, but not other tables (only layers).<br>
<br></div><div>I'd like to build a combo box whose values are dependant on the main usage field value previously set by the customer. <br></div></div></div><br></div>Is this possible? Maybe using views?<br><br>Thank in advance.<br>
</div><div><br></div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><br><div dir="ltr"><div dir="ltr">
<table style="border-right:black 2px solid;width:470px;font-size:11pt;border-bottom:black 2px solid;border-top:black 1px solid;border-left:black 1px solid" border="0" cellpadding="2" cellspacing="2">
  <tbody>
  <tr>
    <td rowspan="2" align="center" valign="center" width="35%"><a href="http://www.ucm.es/" target="_blank"><img src="http://www.ucm.es/nodes/web/00media/img/ucm-ws.png" align="middle" border="0" height="70" width="70"></a>   </td>



    <td colspan="3" align="center" bgcolor="#a50000"><a href="http://www.ucm.es/" target="_blank"><font style="TEXT-DECORATION:none" color="white" face="Verdana"><b>Universidad Complutense de Madrid</b></font></a> </td>
  </tr>
  <tr>
    <td colspan="3" align="center"><font color="#000099" face="Verdana"><b>Víctor Manuel Herreros Villanueva</b>, PhD.</font><br><font color="#000099" face="Verdana" size="1">Project Manager</font>
        </td>
  </tr>
  <tr>
    <td colspan="2" align="left"><font color="#000099" face="Verdana"><b>Facilities Management<br>Data Warehouse</b></font><br> 
        </td>
    <td colspan="2" align="right" width="48%"><font color="#336699" face="Verdana">Jardín Botánico<br>
      Av. Complutense s/n<br>28040 Madrid<br>Spain</font>
        </td>
  </tr>
  <tr>
    <td colspan="2" align="left"><font color="#000099" face="Verdana" size="1"><i>Phn. no. 
      (+34) 91 394 <b>7275</b><br>Fax no.  (+34) 91 394 <b>4773</b></i> </font>
        </td>
    <td align="right"><a href="mailto:vherreros@ucm.es" target="_blank"><font style="TEXT-DECORATION:none" color="#000099" face="Verdana" size="1">vherreros@ucm.es</font></a>
        </td>
  </tr>
  </tbody>
</table>
<br></div>
</div>
<br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>