I have a very large database table that we created a BCS connection for. I would like to pass a field value on my SharePoint connected InfoPath 2010 form as the filter parameter of the External List and then assign values to some fields on my form from the data received from the External List query. In the External Content Type, I have two operations defined. Read Item and Read List. In both of these, I have EmployeeId as the Input parameter. Obviously, in the ReadItem operation, it returns one record based on EmployeeId. In the ReadList operation, I have a limit filter so that it also only returns one record filtered by EmployeeId. If I supply no filter, it returns the first record in the table.
In my InfoPath form, I am trying to figure out how to configure InfoPath so that I can pass the External List the EmployeeId. Here is what I have attempted so far:
1. Create a data connection to receive data from a SharePoint list and I have that pointing at the External List.
2. Create an action on form load that sets the queryField EmployeeId to the EmployeeId field. (I also tried to do this on Submit).
3. Query the External List.
4. Attempt to display the row returned.
The problem is when I set the queryField, nothing is returned. If I don't set the queryField, the first row of data is returned and displayed. I think I am so close to solving this but search after search doesn't reveal an answer and I find myself doing the same thing hoping for a different result.
Has anyone done this? Can you point me in the right direction?