Hi,
Yes, using the xPath this is what you would do. It's a little bit tricky to get it just right, but I hope that the following directions can help you figure this out:
1) edit the properties of the repeating table
2) Add a rule
3) The condition is to test to see if the field is blank, then we are going to instruct InfoPath to copy the values of the preceding field into the inserted field. Name the rule whatever you want, but probably something that means something to you so you will remember what it's for in the future.
4) Add an action
5) The action should be to "Set a fields value". The field you choose in the Field name box should be the name of the field you want the data copied to
6) Now we get a little tricky. Select the fx icon to the right of the value box below the This is where you are going to use InfoPath to pick the groups & fields for the command.
In the formula section type:
preceding-sibling::
Then click on Insert Field or Group. Select the group that the field you want copied is part of. InfoPath may insert a "." here. If it does, manually type in the group name and this is key, add a [1] to it. This will tell InfoPath to look at the previous row to get the information to copy from. After the [1] you must put a / (which tells InfoPath which field from the group you want) Then select Insert Field or Group again and select the field and insert it. Verify the formula. If you get an error saying that it's not a valid name or a node error, you may need to add a my: in front of your group name. When I was testing this it on my machine tonight I kept having to do that. The final result should look like this:
preceding-sibling::groupName[1]/fieldName
Now test it. Hopefully it will work for you.
Ted