Following on from my attempt to use code to filter data direct from a database (http://www.infopathdev.com/forums/t/17761.aspx), I've had to abandon that attempt (since browser-enabled forms can't submit to databases), so I'm using Sharepoint external lists now.
Again, I've got the same goal of populating company detail fields based on the choice from a dropdown box of company names. Trying to avoid code this time, I've created rules that are run when the dropdown field changes. However, the problem I'm encountering is that these fields only ever seem to get populated with the details of the first company name in the dropdown. Even if I choose a completely different company, the company detail fields are only populated with that of the first company.
Clearly I'm doing something wrong but I can't see the problem. I've attached the .xsn file to illustrate the issue. Any help would be greatly appreciated!