I know this is a really old post, but this is something that I'm trying to figure out right now, and so I hope it's ok to resurrect it.
I have two data sources, both SQL Server.
Main puts the submitted form into a database table for me to do reporting type stuff, and is bound to a repeating table.
Secondary is a list of customers that I use to fill a drop down box.
I want to be able to select a customer in the drop down box, and have it put the CustomerID into the CustomerID box on each row of a repeating table so that it doesn't try to insert null values into the main data table.
Currently, it works for the first row because row stores duplicate data, but not for any new rows. I used to know how to do this for stand alone controls, but not for repeating controls, and not for controls bound to a database. It's been quite a while since I've done much programming in infopath.