Quantcast
Channel: SharePoint 2013 - Using SharePoint Designer, InfoPath and Other Customizations forum
Viewing all articles
Browse latest Browse all 9368

How to get User Profile Service information on user OTHER THAN current user?

$
0
0

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.

1. Current User Name:  
2. Current User Title:  
3. Current User Department:
4. Current User’s Supervisor’s Name:  
5. Current User’s Supervisor’s Title:  
6. 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:

 1. Show Advanced View on Fields pane
 2. Expand my Field (which is really a group) called IT Manager Name
 3. Expand what shows up under that which is pc:Person
 4. Right click AccountId and choose Properties
 5. 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?



Viewing all articles
Browse latest Browse all 9368


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>