So much information on how to autopopulate information for the current user or the logged in user in InfoPath. But what about other users? What if there's a field that's 99/100 times going to be the same person, but it's not the person that's logged in?
I would like not just to autopopulate a person field to be a specific user (which is not the current user), but I'd also like to autopopulate surrounding fields for that user's Title and Department.
For instance, consider the following 6 fields.
- Current User Name:
- Current User Title:
- Current User Department:
- Current User’s Supervisor’s Name:
- Current User’s Supervisor’s Title:
- Current User’s Supervisor’s Department:
I know how to get the first three; the internet is swarming with that information.
I'm struggling the last three; searching for this information is impossible without turning up information on current user instead.
The furthest I've gotten so far is to autopopulate Current User's Supervisor's Name by:
- Show Advanced View on Fields pane
- Expand my Field (which is really a group) called IT Manager Name
- Expand what shows up under that which is pc:Person
- Right click AccountId and choose Properties
- Set Default value to [our domain]
\
[IT Manager's ads username]
This solves how to get that 4th field my example list above Current User's Supervisor's Name to autopopulate, but how do I then get the Title and Department from the value I set in step 5 [our domain]\
[IT Manager's ads username]? Or is there a different/better way altogether to go about getting a non-current user's info to autopopulate in InfoPath form fields?
UPDATE
I just want to clarify that I'm not asking if there's a way to autopopulate the current user's supervisor. I'm aware that Manager is one of the User Profile service fields. But the point is that I want to have a field in which the current user fills in a username (different than his or her own), and to have User Profile Service called on that provided username to autopopulate Title and Department in surrounding fields. The question is about how to call information with User Profile Service on any provided username, specifically what steps to take to set this up in InfoPath Designer.