Wednesday 10 July 2019

QGIS customized attribute dialog - Value Relation

In the post you saw how to use Value Map 'method' to bind values between two tables that are linked together - there is a relation between the tables in other words.
But what if the foreign keys or attributes assigned to those keys are changed in one table? This method ('hard coding' values using Value Map) does not track such changes - unless values are updated every time such changes takes place.
Good news is that QGIS has other methods, that are better for such cases - you can use
In simply words any changes in database tables will be reflect in customized attribute dialog.


insert into country (ctry_iso2, ctry_name) values 
('AF', 'Afghanistan'),
('AX','Aland Islands'),
('AL','Albania'),
('DZ','Algeria'),
('AS','American Samoa');













insert into country (ctry_iso2, ctry_name) values 
('GA', 'Gabon'),
('GM', 'Gambia'),
('GE', 'Georgia'),
('DE', 'Germany'),
('GH', 'Ghana'),
('GI', 'Gibraltar'), 
('GR', 'Greece'),
('GL', 'Greenland');




select *
from airspace
where ctry_iso2 = 'GE';






No comments:

Post a Comment