Good afternoon.
I have been wrestling with this issue for a few hours, and I thought I would reach out to the experts in the InfoPath community.
I am basically trying to get the Manager's name given an employee's Preferred Name. I am current using the GetCommonManager and GetUserProfileByName webservices where I pass the username (e.g. 1x234) to the GetUserProfileByName webservice, query, set a field with the Manager Value (not name), pass the Manager Value as the accountName parameter for the GetCommonManager webservice, and set a field for the Name (Preferred) returned. This works well if I provide the user name, but I want to pull this manager information for users in a drop-down list and not the user of the form (which would be a simple matter of using username()). I found the following example, but I believe it relies on the user of the form's information:
https://claytoncobb.com/2009/06/21/userprofileservice-extended/
Have a great weekend.