abhi1982
Novice

Update Manager from User Profile?

Jump to solution

I have a list where applications have been submitted and sent for approval to their manager. I am trying to find a way to everyday compare manager field in list to manager field in user profile of user to ensure manager is correct. If manager does not match user profile, then update manager in list.

 

Thanks

Tags (1)
0 Kudos
Reply
7 Replies
powersj1
Scholar

Re: Update Manager from User Profile?

Jump to solution

You would create a site workflow and schedule it to run daily.  In the workflow, query the list, retrieving the ID, User, and Manager field. Insert a For Each action.  Query the User profile and compare to the returned manager to the Manager field.  If they are different, update the item using the ID as the filter. 

 

I assumed you would want to filter the initial query to ignore items that have already been approved.

 

 

 

This would update the manager field in your list.  The next problem is that you have a workflow running on those items, presumably with a task assigned to their previous manager.  The simplest solution is to create a list workflow that starts when an item is modified and meets certain conditions.  Manager (previous value) field does not equal the Manager.  Terminate the previous workflow.  Start the workflow again.  The workflow in this case would be your normal approval workflow.

 

0 Kudos
Reply
Not applicable

Re: Update Manager from User Profile?

Jump to solution

Jeremiah Powers​, thanks for being helpful on the community today!

0 Kudos
Reply
abhi1982
Novice

Re: Update Manager from User Profile?

Jump to solution

Hi Jeremiah,

Thanks for your detailed response. This looks great, however, I am having issues with Query User Profile action. I am getting error "User profile does not exist for user". I am not sure what this action is trying to look for (i.e. format for input).

0 Kudos
Reply
abhi1982
Novice

Re: Update Manager from User Profile?

Jump to solution

All working now. Figured it out. Thanks a lot for your help

0 Kudos
Reply
Not applicable

Re: Update Manager from User Profile?

Jump to solution

Hello, Abhi Pathania​, If this has worked out for you, please select a "correct answer" as it helps others on the community looking for correct answers find them.  Thank you!

0 Kudos
Reply
abhi1982
Novice

Re: Update Manager from User Profile?

Jump to solution

Hi Frank

Correct answer has been marked already

Reply
Not applicable

Re: Update Manager from User Profile?

Jump to solution

Yes, sorry, Abhi Pathania​, we lost a lot of "correct answers" in a recent merge of spaces. Jive admins were able to recover those just yesterday.  Thanks for coming back to look, tho!

0 Kudos
Reply