Jun 07 2022 01:36 PM
Jun 07 2022 01:36 PM
When I make a change in one list, how do I get it to reflect that change in another? I assume I need to use an automated Flow, and while I see the trigger for modified columns, I don't know which action to use to update the other list with the change.
Jun 08 2022 01:53 AM - edited Jun 08 2022 01:57 AM
Jun 08 2022 01:53 AM - edited Jun 08 2022 01:57 AMSolution
@mlefler75 in Power Automate create an instant cloud flow from blank, on the next screen click Skip, then from the triggers select SharePoint and select the when an item is created or modified trigger.
Select your site and list. In this example I am going to change the 2021 population of a Spanish village called Abrucena in the list called Almeria. This will then be reflected in the second list, Almeria L4.
Immediately after the trigger add a get item action to get the data for the item that was modified. Again select your site and list then click in the ID field and select ID from the dynamic content box that appears on the right.
Next, add a get items action which will get the items from the second list, Almeria L4. But we only want the item that is the same as in the first list. So click on show advanced options and in the filter query field type Title eq ' ' and inside the single quotes select Title from the get item section of the dynamic content box. Of course you might not be using the Title column as the column to identify which item to update. (In a filter query you don't use =, you use eq for equals, ne for not equals, gt for greater than, lt for less than, ge for greater than or equals and le for less than or equals)
Next, add an update item action, select your site and list and select any mandatory columns from the get items section of the dynamic content box (in my example it's ID and Title). Next for each of the fields you want to update in the second list select the column from the get item section of the dynamic content box, in this case the 2021 figure.
You will find that due to the get items action the update item action gets wrapped in an apply to each. This is quite normal and required, even though we are only bringing back 1 item from the second list.
Name, save and test your flow. I have added the population of Abrucena as 1208 in the 2021 column:
The flow runs and adds the the population into the Abrucena item in the second list.
Microsoft Power Automate Community Super User