cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
animartis
Level: Powered On

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
Community Support Team
Community Support Team

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
Gristy
Level 10

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

Community Support Team
Community Support Team

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

animartis
Level: Powered On

Re: Update Existing SharePoint List with Manager from O365Users

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

Highlighted
animartis
Level: Powered On

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?
Community Support Team
Community Support Team

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.
animartis
Level: Powered On

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"
}
animartis
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,289)