<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Century Gothic";
        panose-1:2 11 5 2 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Century Gothic","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Century Gothic","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif"">Hi list,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif"">I’ve got a project set up in QGIS 3.4.x with a parent polygon layer and a child attribute layer.  Each site polygon represents a piece of land and can have multiple tasks associated
 with it (grass cutting, weeding, pruning, etc.).  Sites can be made up of multiple polygons.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif"">With relations set up in the project it is easy to select a polygon feature and update attributes.  It is easy to add or edit associated tasks.  See screenshots below.  With multiple
 site polygons selected I can use the “modify selected attributes simultaneously” to update information.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif"">I need to find a way to be able to select site polygons and add the same associated task to each one.  For example, select all site polygons that need grass cutting task associated
 with them, assign the task and maintain the parent child relationship.  It would be great if there was a way to do this through the form.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif"">One solution I have been toying with is using a SQL query to select the site polygons and insert into the associated tasks table a new record associated with each polygon.  The query
 works but I need a way to tie it into the form.  Anyone got any pointers?  Some python to call the SQL and get the selected feature IDs from QGIS?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif"">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif"">Ross<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif"">Screenshot 1:
<a href="https://nextcloud.mixedbredie.net/s/D7DFjs2PrcnEf7t"><span style="color:windowtext">https://nextcloud.mixedbredie.net/s/D7DFjs2PrcnEf7t</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif"">Screenshot 2:
<a href="https://nextcloud.mixedbredie.net/s/EBzeTopsBcZBSJc"><span style="color:windowtext">https://nextcloud.mixedbredie.net/s/EBzeTopsBcZBSJc</span></a>
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Century Gothic","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:#4F6228;mso-fareast-language:EN-GB">Ross McDonald |
</span></b><span style="font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:#4F6228;mso-fareast-language:EN-GB">Geo-evangelist | Angus Council, Digital Enablement and IT | Angus House, Orchardbank Business Park, Sylvie Way, Forfar DD8 1AT<b> |
 t: 01307 49 22 39<o:p></o:p></b></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div> </div>
<div>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-SIZE: 7.5pt; FONT-FAMILY: 'Arial','sans-serif'; mso-bidi-font-size: 8.0pt; mso-bidi-font-family: 'Times New Roman'"><font size="2">This message is strictly confidential. If you have received
 this in error, please inform the sender and remove it from your system. If received in error you may not copy, print, forward or use it or any attachment in any way. This message is not capable of creating a legal contract or a binding representation and does
 not represent the views of Angus Council. Emails may be monitored for security and network management reasons.<span style="mso-spacerun: yes">
</span>Messages containing inappropriate content may be intercepted. Angus Council does not accept any liability for any harm that may be caused to the recipient system or data on it by this message or any attachment.
</font></span></p>
</div>
</body>
</html>