cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Update a Sharepoint list record from another Sharepoint list record

Hello,

         I am having a little trouble trying to figure out how to take data from one sharepoint list and update another sharepoint list with it.

 

So i have two sharepoint list Employee Master Data and Employee Edit. What i am trying to do is when an employee submits a new item in "Employee Edit" it will update the data in "Employee Master Data" after a quick approval process. However i am having a hard time figuring out how to match the two lists togther. 

From searching and reading alot of examples they mostly suggest using the List ID to match the two lists. However The employee recond at ID 20 on the "Employee Master Data" list is not the same as the record at ID 20 on the "Employee Edit" list. 

I am aware that i need to find a value in both lists that will stay static as a way to link the two, of which the Email value is the best i can come up with. 

Can anyone provide any suggestions or shed some light on a good way to go about this.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Update a Sharepoint list record from another Sharepoint list record

If you do a Get Items on the Employee master list you can supply an OData query that will get the record which matches the email address of the record in the Employee Edit list.  The exact syntax taht you would use is dependent on how you are storing the email in SharePoint.  Is it a single line of text field or a person field?  If its a single line of text then the Odata query is justs 

emailfield eq dynamiccontentfieldwithemail


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: Update a Sharepoint list record from another Sharepoint list record

If you do a Get Items on the Employee master list you can supply an OData query that will get the record which matches the email address of the record in the Employee Edit list.  The exact syntax taht you would use is dependent on how you are storing the email in SharePoint.  Is it a single line of text field or a person field?  If its a single line of text then the Odata query is justs 

emailfield eq dynamiccontentfieldwithemail


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Frequent Visitor

Re: Update a Sharepoint list record from another Sharepoint list record

I did something like this recently.

 

You want to do a "Get Items" on the list you want to update, and in the filter query field put MASTER_DATA_COLUMN(not-dynamic content) eq 'employee edit column (dynamic content from the "when item is edited" trigger)'

 

Then, you will probably have to do an apply to each with the values being from the get items above. You'll then use that same ID to update your items with an action in flow, and use the dynamic content to populate the new list as you please. Not sure if your approval workflow will conflict with that.

 

Helpful resources

Announcements
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!

Top Solution Authors
Users online (8,862)