[Qgis-user] Value relations in QGIS

Randal Hale rjhale at northrivergeographic.com
Sat Mar 18 04:59:11 PDT 2017


Oohhhh - didn't know that. Thank you so much.




On 03/18/2017 01:37 AM, Bo Victor Thomsen wrote:
> Randal -
>
> There is already a bug report for this defect : 
> http://hub.qgis.org/issues/15920
>
> (and I would dearly love to have it fixed. We use the qlr 
> functionality extensively in my workplace)
>
> Regards
>
> Bo Victor Thomsen
>
> Municipality of Frederikssund
>
> Denmark
>
>
>
>
> Den 17/03/17 kl. 16:42 skrev Randal Hale:
>> 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
>>
>>
>>
>
> _______________________________________________
> 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

-- 
-----------------
Randal Hale
North River Geographic Systems, Inc
http://www.northrivergeographic.com
423.653.3611 rjhale at northrivergeographic.com
twitter:rjhale




More information about the Qgis-user mailing list