You can track changes to the assignedTo field by placing an OnAfterChange event handler on that node, but there is a bit of a catch because from the event handler's perspective a row insertion looks exactly like a user's value modification so we have to be a little tricky. I suggest the following.
Add a new node my:ignoreInserts to your main data source, and make it a boolean value. Whenever you query your secondary data source from a rule, set this node's value to true right before the query, and to false right after. Your form's event handlers can check this value to know whether a change to a node was due to a query/row insertion, or due to a user modification.
Also add these two subroutines and one function to your VBScript code:
Sub IgnoreInserts
XDocument.DOM.selectSingleNode("/my:myFields/my:ignoreInserts").text() = "true"
End Sub
Sub DoneIgnoringInserts
XDocument.DOM.selectSingleNode("/my:myFields/my:ignoreInserts").text() = "false"
End Sub
Function IgnoreInsertsValue()
IgnoreInsertsValue = XDocument.DOM.selectSingleNode("/my:myFields/my:ignoreInserts").NodeTypedValue
End Function
Call the first subroutine before adding a row to the table to set my:ignoreInserts to true, and call the second one after adding the row to set it back to false, so inserting a row would look something like this
IgnoreInserts 'Set my:ignoreInserts to true
XDocument.View.ExecuteAction "xCollection::insert", "group2_1"
'Make any changes you need to make to the new row
DoneIgnoringInserts 'Restore my:ignoreInserts to false
Then all you've got left to do is write the OnAfterChange event handler. In the event handler, you will need some conditional code to check the value of my:ignoreInserts
If IgnoreInsertsValue() = "false" and eventObj.Operation = "Insert" Then
' insert the code you want to perform here
'eventObj.OldValue holds the previous value of the field
'eventObj.NewValue holds the new value of the field
'you can access the element to which this attribute belongs using eventObj.Site.selectSingleNode("..")
End if