I have an InfoPath 2010 form where I want a user to select an 'employee name' and the rest of the fields populate with the specific employees data. I have been working with the rules to try to manage how this should be done and working with the data connections, but don't quite have it. At this time when I select the employees name from 'employee name' drop down, the phone field and extension field also contain the employees name. Can someone please help me figure this out?
Thank You
:)
You need to create the data connection for all the fields and need to apply filter based on the value selected for employee name on the other fields.
In your employee phone field text box(/dropdown box) right click and select Programming > Changed event
Now you have to define the function State_Changed(object sender, XmlEventArgs e)
Create an Xpath navigator to retreive the value selected in the employee name field. Use this as the filter value and write a query to retreive the phone information.
Note: the phone field should have the option show data on form load unchecked in its datasource.