[Qgis-user] use autogenerated form in Qgis for same table in different postgres databases

Bernhard Ströbl bernhard.stroebl at jena.de
Sun Dec 21 23:14:20 PST 2014


Hi Janneke,

this is not answering your question... but, have you tried the 
DataDrivenInputMask plugin [1]. It auto-generates input masks for 
PostgreSQL layers. Only prerequisite is a properly designed database in 
respect to constraints, default values, data types.

regards

Bernhard

[1] http://plugins.qgis.org/plugins/DataDrivenInputMask/

Am 21.12.2014 15:44, schrieb Janneke van Dijk:
> Dear all,
>
> I have set up a form in QGIS 2.6 using the attribute editor layout
> 'autogenerate', to edit an editable view in a postgres database. This
> works nicely. I would like to use this form to edit data in other
> databases that have an identical structure. Ideally, I would set up a
> project file with all properties set where I could choose to load layers
> either from one or another database (with identical structures), and
> when I edit a layer the correct form opens.
>
> If I save it as a .qml file (from project1 connected to database1), then
> load it in project2 (connected to database2 with identical tables
> loaded) through properties>fields>load style it appears to load it (the
> edit widgets get changed to the same as in project1), but when I click a
> value relation widget the layer, key column and value column fields are
> empty. When I open the attribute table all fields that have a value
> relation that refers to a lookup table that contains different values
> than the original lookup table will show their values between brackets
> (at least, those values that do not appear in the original table).
>
> It looks as if the .qml retains a link to the original database and
> lookup tables (and not just to layer names as they are loaded in the
> project). Is there a way to configure a form based on a table structure
> that can be re-used for other tables with the same structure?
>
> Thanks,
>
> Janneke
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> __________ Information from ESET Mail Security, version of virus signature database 10911 (20141221) __________
>
> The message was checked by ESET Mail Security.
> http://www.eset.com
>



__________ Information from ESET Mail Security, version of virus signature database 10912 (20141221) __________

The message was checked by ESET Mail Security.
http://www.eset.com





More information about the Qgis-user mailing list