Create task and add manager of assignee


Badge +4

Is there a way to capture the manager of assignee and add to workflow task list?  I have a workflow that creates review tasks in workflow task list, but I need for "Manager" value to be populated on the task list, when the task is created.  I'm using SharePoint 2013 Enterprise and Nintex WF 2013


10 replies

Badge +16

Do you have nintex forms?

you can achieve this by editing your task form inside your flexi task action and using the function for user profiles inside forms to pull back the assignees manager.

Badge +4

Yes, I do have Nintex Forms available.  I will give that a try!  Do you have any examples that I may follow?

Thanks,

Rene

Badge +16

Add a calculated control to the form and choose expression like this:

userProfileLookup(Current User, "Manager")

Badge +16

Badge +4

Have tried and still no value gets saved on the task list.

Badge +16

so to be clear, you want this value to be saved in the workflow task list, not the list that the item was started from?

Badge +4

That is correct.  I want to save to the workflow task list.

Userlevel 3
Badge +9

You could add a workflow to the workflow task list where when a task is created, it looks up the assigned to person and pulls back their manager.  You can use the Query User Profile action if you have user profile services turned on.  If you don't, then you could use Query LDAP

Badge +16

I agree with Brendan you could do that.  I have done this before in nintex forms I am sure but I think it meant saving that expression into a form variable and then querying for that and updating a person or group type field.  Brendan's approach is the more simple approach.  So create your workflow on the workflow tasks list, ensure there is a conditional start if required and use query user profile to get the manager of the assigned to.  Use that value to update the manager field.

Badge +4

Thanks to Both Brendan & Cassie.  I did create a workflow on the workflow task list and I'm able to populate the manager field.

I appreciate all your help!

Reply