I have a SharePoint list built by someone else with a blank text field titles "manager" I am trying to build a site workflow to automatically go through each record look at the "name" field ( people picker) then update the "manager" field with the manager name listed in the person User Profile. We DO NOT HAVE the query user profile action available.
I was able to build a list workflow to do this successfully by setting up the "update item" action to have manager equals user profile and the value is the name of the person listed in the "name" field. I dont want to use a workaround by setting the list workflow to run on modified, then create a 2nd workflow to update all items when a record is modified which will change all records and then "kick off" the first workflow but it will be a never ending cycle and not the most efficient way to do this.
I am unsure how to build this as a site workflow so far what I did was
1) Query list action:
- List name "old list"
- Selected the field "ID" and stored in an collection variable and called it COLLID
- Selected the field "Name" and stored in collection variable called COLLNAME
2)For each action:
- COLLID stored into new action list ID variable called "VARID"
3)For each action:
- "COLLNAME stored into new people/group variable called" VARNAME"
4) Update item action"
- Update the list name "old list"
- Where ID equals VARID
- Field: Manager
- Content type equals: User profile> Manager name (from the user profile)
- Equals: Value: VAR NAME (I dont see "current item" in the drop down selection)
I am brand new to site workflows so i likely built it wrong. an help would be greatly appreciate