[Qgis-user] Populating field from another table automatically when capturing data
Theunis Morgenthal
tlmorgenthal at gmail.com
Wed Nov 18 07:57:09 PST 2020
Good day
I am using QGIS3.14 Pi.
*Populating field with value from another table automatically when
Capturing data*
I want to automate an attribute field based on the value from previous
attributes.
I have a point feature in a GeoPackage with WorkType and Work Detail
fields which I have created value relations and it works great. For
the next field I want to specify the unit of measurement for example I have
a Class "Borehole" - subclass "Drilling" my Unit of measurement is "PSI".
The behaviour I am looking for is when I select the WorkType the Unit of
measurement will be filled in automatically.
[image: image.png]
In a second attribute table I have a list of WorkTypes and WorkDetails and
the Unit of Measurement which I am linking to from value relations. How do
I autofill the Unit field based on the selected Class in the first
attribute table?
Sorry I tried to search for an answer but could not find something that
suits my limited knowledge.
I guess my answer lies with the Default Expression option but do not know
how to set it up properly. I tried the attribute function:
attribute(@TableWorkDetail,'Units') but the field remains blank. Also I
have ticked Apply default value on update.
Your assistance is greatly appreciated
Regards
Theunis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201118/32852d1b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 12297 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201118/32852d1b/attachment-0001.png>
More information about the Qgis-user
mailing list