[Qgis-user] use autogenerated form in Qgis for same table in different postgres databases
Janneke van Dijk
janneke.qgis at gmail.com
Sun Dec 21 06:44:23 PST 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141221/7f62ac26/attachment.html>
More information about the Qgis-user
mailing list