[Qgis-user] Value relations in QGIS

Bernhard Ströbl bernhard.stroebl at jena.de
Mon Mar 20 00:25:17 PDT 2017


Hi Randal,
copying projects is even simpler with the authentication. Just make sure 
that all users have the same id set for their PostgreSQL-connection.
Another way to achieve what (I assume) you intend is to use my Plugin 
DataDrivenInputMask [1] that automatically creates combos for relations, 
checks for default and not null values etc.

Bernhard

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

Am 18.03.2017 um 16:52 schrieb didier peeters:
> 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
>> <mailto: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
>>


__________ Information from ESET Mail Security, version of virus signature database 15116 (20170320) __________

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





More information about the Qgis-user mailing list