cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Update Existing SharePoint List with Manager from O365Users

 

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
Highlighted
Super User II
Super User II

Re: Update Existing SharePoint List with Manager from O365Users

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

Highlighted
Community Support
Community Support

Re: Update Existing SharePoint List with Manager from O365Users

 

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

Highlighted
Helper II
Helper II

Re: Update Existing SharePoint List with Manager from O365Users

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

Highlighted
Helper II
Helper II

Re: Update Existing SharePoint List with Manager from O365Users

@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?
Highlighted
Community Support
Community Support

Re: Update Existing SharePoint List with Manager from O365Users

 

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.
Highlighted
Helper II
Helper II

Re: Update Existing SharePoint List with Manager from O365Users

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"
}
Highlighted
Helper II
Helper II

Re: Update Existing SharePoint List with Manager from O365Users

@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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (7,757)