Question

I have a list and couple of fields: 1. single text line field "Title" 2. a people picker "Employee".

Would it be possible to set the value of "Title" field in a workflow once the people picker value gets set? All I can see is people picker returning Display Name, Email Address, Login Name, User id number... but not the additional fields that I need.

I see someone had a similar question, but I'm failing finding the solution... SPD 2013 - Copy people picker field to text field in same list

Thanks

Was it helpful?

Solution

Your 2013 workflow can make REST web service calls to access User Profile Services data for the user.

General properties:

yourSiteUrl/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='spdemo\samc'

A single property:

yourSiteUrl/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='Manager')?@v='spdemo\samc'

So you will need get the user from the people picker, retrieve the login name of the user, and then make the REST call for any other property. You may need to use the string actions to split the login name from the full login string. (i:0#.w|spdemo\samc)

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top