[Qgis-user] Field values selectable through combo boxes

Víctor Manuel Herreros Villanueva vherreros at ucm.es
Thu Feb 6 04:40:05 PST 2014


Hello all!

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.

*Problem*
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.

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.

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.

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.

But then they'll have to have at their disposal, for the secondary usages,
only the appropriate ones, not all the secondary usages listing.

*Solutions*
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).

I'd like to build a combo box whose values are dependant on the main usage
field value previously set by the customer.

Is this possible? Maybe using views?

Thank in advance.


  <http://www.ucm.es/> *Universidad Complutense de
Madrid*<http://www.ucm.es/>  *Víctor
Manuel Herreros Villanueva*, PhD.
Project Manager
*Facilities ManagementData Warehouse*
 Jardín Botánico
Av. Complutense s/n
28040 Madrid
Spain
*Phn. no. (+34) 91 394 7275Fax no.  (+34) 91 394 4773*  vherreros at ucm.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140206/8a8374b0/attachment.html>


More information about the Qgis-user mailing list