Having looked at another of your "how to" Select a Master Table Row via Code I got some more interesting pointers.
Using the expression :
xdXDocument:GetNamedNodeProperty(my:Members, "CTRL1_5", 1)
You were able to display the position of the currently selected row in the master data table.
I have found the control id for my table and replaced my:Members with my own group.
I tried the same but without success. What happens is that the expression always displays 1.
I am now thinking that if I can retrieve the position number in this way, when I insert a new row in my other master/detail table I can use the position reference to track down my UID.
It just feels like I am running about barking at all the trees in the wood now!