<div dir="ltr">Good day<div><br></div><div>I am using QGIS3.14 Pi.</div><div><br></div><div><b>Populating field with value from another table automatically when Capturing data</b><br></div><div><b><br></b></div><div>I want to automate an attribute field based on the value from previous attributes.</div><div>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.</div><div><br></div><div><div><img src="cid:ii_khnkyf0g0" alt="image.png" width="542" height="93"><br></div></div><div><br></div><div>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?</div><div><br></div><div>Sorry I tried to search for an answer but could not find something that suits my limited knowledge.    </div><div><br></div><div>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.  </div><div><br></div><div>Your assistance is greatly appreciated</div><div><br></div><div>Regards</div><div><br></div><div>Theunis</div><div><br></div><div><br></div></div>