cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stephenJames
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
Pstork1
Dual Super User
Dual Super User

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
Pstork1
Dual Super User
Dual Super User

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.
Jakemarshgg
Frequent Visitor

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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,786)