You may have to add a button click to get the functionality you are looking for. From what I understand, the user will
- enter a value into a textbox
- visually select a row in a repeating table
- then the user would have to press a button to move the data to the selected row
I have not found that InfoPath does not have as many events to hook into as in over places.
So the key here is when the button is clicked, you have the index of the selected row. I wrote a method like the one below to get the current row selected in a repeating table. If I remember correctly, the repeating table had to be set up as Master table for this to work.
Function GetSelectedItemsIndex()
Dim iRow
Dim iItemCount
iRow = 1
iItemCount = XDocument.DOM.selectNodes("//my:Item").length
'check the current part row count
If iItemCount = 0 Then
iRow = 0
Else
'we know there is at least one row
iRow = 1
'Call to the dom and get the current selected row.
'-1 will be returned if there is any error trying to
'locate the current row.
If iItemCount > 1 Then
iRow = CInt(XDocument.GetNamedNodeProperty( _
XDocument.DOM.selectSingleNode("my:Items"), "CTRL408", -1))
End If
End If
GetSelectedItemsIndex = iRow
End Function
Jason
http://www.k2distillery.com/