[Qgis-user] Value relations in QGIS
didier peeters
dpeeter1 at ulb.ac.be
Sat Mar 18 08:52:23 PDT 2017
Hello Randy,
I haven’t been working with value relations very recently but what I used to do to easily share it with other users was to save everything in the project file, then duplicate this file and replace the login name (or anything else that would need to be adapted) with a text editor.
HTH,
Didier
> Le 17 mars 2017 à 16:42, Randal Hale <rjhale at northrivergeographic.com> a écrit :
>
> Question.
>
> I'm working with a group and I'm attempting to "idiot proof" editing a bit - well - at least the attribution. I've set up a database (postgresql/postgis) and went so far as to set up foreign keys. I set up value relations and we now have drop down lists for about everything.
>
> I decided to save what I am doing. I saved the data layer as a qlr. I saved the style as a qml. I re-added the data using the qlr and the style using the qml. EXCEPT - it didn't restore the value relations. They are in the qml file:
>
> <edittype widgetv2type="ValueRelation" name="confk">
>
> <widgetv2config OrderByValue="0" AllowNull="0" FilterExpression="" UseCompleter="0" fieldEditable="1" Key="id" constraint="" Layer="contractor_tbl20170317111848429" Value="contractor" labelOnTop="0" constraintDescription="" AllowMulti="0" notNull="0"/>
>
> </edittype>
>
> the Layer -> contractor_tbl20170317111848429 isn't quite the right name but I'm assuming that's some internal QGIS layer naming. I even changed it - it wouldn't restore.
>
> I did more digging and discovered the value relation is also in the qlr file - but it's not restoring the widgets either. Maybe it doesn't matter that I saved a qml.
>
> Question is - should it restore? Or are value relations (widgets) just for that QGIS session - so I need to set this up 5 times for 5 people? Which I don't mind doing - I was under the impression this saved/restored with the qlr/qml.
>
> QGIS: 2.18.4
> OS: Ubuntu (mate) 16.04
> QGIS repo/Ubuntu GIS repo.
>
> Thanks
>
> Randy
>
>
>
> --
> -----------------
> Randal Hale
> North River Geographic Systems, Inc
> http://www.northrivergeographic.com
> 423.653.3611 rjhale at northrivergeographic.com
> twitter:rjhale
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170318/49c883a1/attachment.html>
More information about the Qgis-user
mailing list