cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
harishankar
Frequent Visitor

Update Sharepoint list when another Sharepoint list is updated

HI

 

I am new to power automate. I don't know most of the connectors because of that i could not figure out this flow.

 

I have two sharepoint list.(List - 1 and List - 2). In both the list i have a Number Column which represents the Quantity of multiple products.

 

Senario:

 

1. List - 1 has  two products. Product - A of 10 items and Product - B of 5 items.

2. List - 2 has columns similar to List - 1, except that the Number(Quantity) column for both the products is zero.

3.In List - 2, when a user creates/updates the Quantity value of Product - A to 2 and Product - B to 5. I want to reduce the Product - A quantity to 8 and Product - B quantity to 0 in List - 1 using power automate. 

 

I don't know how to create this flow. If possible can anyone give a detailed solution for this scenario.

 

Thank you

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sundeep_Malik
Community Champion
Community Champion

Hey @harishankar 

You can use the trigger when an item or file is modified. 

Sundeep_Malik_6-1663339749003.png

 

Then use Get Item

Sundeep_Malik_1-1663339314043.png

Then use compose. Compose Formula: sub(outputs('Get_item')?['body/Quantity'],triggerOutputs()?['body/Quantity'])

Compose used to subtract the quantity from list 1 and list 2.

Sundeep_Malik_2-1663339345642.png

After this use Update item action. 

Sundeep_Malik_3-1663339521649.png

This is how the SP List looks like:

Sundeep_Malik_4-1663339556630.png

Sundeep_Malik_5-1663339577496.png

 

Make sure you keep the title and product name column similar. Title column is storing the product id. 

 

 

I hope this helps. 

View solution in original post

1 REPLY 1
Sundeep_Malik
Community Champion
Community Champion

Hey @harishankar 

You can use the trigger when an item or file is modified. 

Sundeep_Malik_6-1663339749003.png

 

Then use Get Item

Sundeep_Malik_1-1663339314043.png

Then use compose. Compose Formula: sub(outputs('Get_item')?['body/Quantity'],triggerOutputs()?['body/Quantity'])

Compose used to subtract the quantity from list 1 and list 2.

Sundeep_Malik_2-1663339345642.png

After this use Update item action. 

Sundeep_Malik_3-1663339521649.png

This is how the SP List looks like:

Sundeep_Malik_4-1663339556630.png

Sundeep_Malik_5-1663339577496.png

 

Make sure you keep the title and product name column similar. Title column is storing the product id. 

 

 

I hope this helps. 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (5,970)