Hello zafiq76,
Welcome to the InfoPath community. This is a common use case for our users and for forms we design. There are two ways to solve your issue:
- One data connection method
- Two data connection method
One Data connection Method:
- Create a data connection to your SharePoint list with the desired fields.
- Use a unique value such as user name or user Id column from the list to specify in the dropdown
- On the dropdown, create an action rule to set related fields value to the value from your 2DS with a filter of the field from your main ds = 2ds field
Two Data connection Method:
- Create a data connection to your SharePoint list with only the field for your dropdown value
- Create a second data connection to the same list with the dropdown value, and any other values that you want to use (note, do not query on load)
- On the dropdown, have a rule that sets the query field value of the secondary data source to the value of the dropdown, and then query for information
- This should return only the related data, and then you can set the fields in your form to the values in the list.
If you want to take it a step further, and update the information on the list, that gets a bit trickier. You can use a method called CAML to do it out of the box, but qRules has much better functionality with a command called SubmitToSharePointList.
Hope that helps!
Bre