cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
animartis
Helper II
Helper II

Update Existing SharePoint List with Manager from O365Users

I have a PowerApp that people use to log time worked in a SharePoint List. I recently updated the PowerApp to write their Manager (from Office365Users) to a column in the SP List called LeaderName when they submit the form. Now I want to go through the entire SharePoint List and update all the previous records submitted before I added the new LeaderName column.

 

So, cycle through every entry and use 'Created By' to update LeaderName based on an Office365Users lookup. Any guidance would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @animartis ,

 

Please try to refer to the following image to configure the Flow.

4.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Gristy
Resident Rockstar
Resident Rockstar

Flow type: Instant

Trigger Type: Button

Actions:

1) Get Items 

2) Get User Profile passing Created By Email

3) Update Item passing the Manager and the ID of the SharePoint Item

v-bacao-msft
Community Support
Community Support

 

Hi @animartis ,

 

Please try to refer to the following image to configure the Flow.

4.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-bacao-msftThis is perfect, thank you so much!

@v-bacao-msft 

Oops, I spoke too soon. I'm using the Person or Group in my SharePoint list and and when I run the Flow it fails. The only field available in my Flow is LeaderName Claims, which I mapped to the Display Name.

 

image.png

I get this error when I run the Flow.

{
"status": 400,
"message": "Invalid text value.\n\nA text field contains invalid data. Please check the value and try again.\r\nclientRequestId: 094da11f-099e-4856-ba09-44d286a02c4f\r\nserviceRequestId: 094da11f-099e-4856-ba09-44d286a02c4f"
}
 
When I set up the PowerApp field to pull the Manager, the tutorial I followed said to put this in.
 
{DisplayName: Office365Users.ManagerV2(User().Email).displayName,Claims: "i:0#.f|membership|" & Office365Users.ManagerV2(User().Email).mail}
 
Does the People Picker field need more than just the Display Name?

 

Hi @animartis ,

 

Please change the Display name to Email.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft ,

 

Different error message when I use Mail.

 

{
"status": 400,
"message": "Route did not match\r\nclientRequestId: 898040fa-88ba-46e2-9650-29c41f018453\r\nserviceRequestId: 898040fa-88ba-46e2-9650-29c41f018453"
}

@v-bacao-msft

Nevermind, my apologies. I thought you had to use Current Item to keep the fields the same but when I selected the actual names, i.e. ID and Title, it worked fine. Thank you so much!!

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (52,223)