I have layers loaded from PostGIS into QGIS(2.14). Since it is a database and I try to respect the normalization rules, datas are not always stored directly into the layer table, and sometimes they exist as an ID number. With the "value relation" setting in the field properties I can display the corresponding information as a drop-down menu. But I also would like to display this information as a label into the map, for now I just can display the ID number.
Does anyone have any idea on how to display the actual information ? I can think of few workaround, of which none are entirely satisfying :
- adding a field with the information into the DB table, but in order to keep a bit of DB logic I would need to set some triggers automatically updating the corresponding fields between tables. In other words, a bit painful for a rather simple process, but doable.
- using a QGIS table join and display the joined data, but it seems not possible to save the table join like as a default style which would be automatically present everytime I load my layer. If it could work, I am developping a process meant to be used by many users, which nonetheless are not having any QGIS experience for now, but the idea is to automatize things and this is typically the kind of little things that are generally adding to one another and complexify a process. So I'd avoid that.