SOLVED

Update changes between two SharePoint List

Copper Contributor

Hi,

I have two Microsoft lists - one for all customer tickets and another for customer information. I need to ensure that if I update a specific customer's information in the all-customer tickets list, the same changes are reflected in the customer information list. If the record does not exist in the customer information list, it should be created as a new entry.

3 Replies
best response confirmed by Mihiranp (Copper Contributor)
Solution

@Mihiranp you will need to build a flow in Power Automate.

 

These are the 2 SharePoint lists.

0-SP.png

 

The flow is as follows:

 

1-Flow.png

 

2-Flow.png

 

If one of those 3 columns has changed then get all the items from the CustomerInfo list. If it was a different column that changed then do nothing.

 

3-Flow.png

 

Condition 2 below looks at whether the Title column from the get items action is equal to the CustomerEmail column in the CustomerTickets list. If it is set the boolean variable created earlier to the expression true.

 

4-Flow.png

 

Outside the apply to each add another condition to check if the variable is true. If it is, update the item in the CustomerInfo list, if not create a new item.

 

5-Flow.png

 

In the CustomerTickets list I changed the Isalnd to Guadalupe, the flow then ran and the Island in CustomerInfo was updated to Guadalupe.

 

6-SP.png

 

I would then have a second flow with the when an item is created trigger. Otherwise you have to add more actions (and complexity) to this flow to avoid the never-ending loop where an item is constantly updated.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

@Rob_Elliott 

I have created as below

 

Mihiranp_0-1710513692630.png

Mihiranp_3-1710513748623.png

 

 

Mihiranp_4-1710513788280.png

 

Mihiranp_6-1710513839603.png

 

Mihiranp_7-1710513874736.png

 

Mihiranp_8-1710513971499.png

 

Flow run successfully but item not created below is test result

 

Mihiranp_9-1710514053293.png

 

@Rob_Elliott 

 

Hi,
When updating an item in the main list, a new item is created successfully in the second list if it doesn't already exist. However, if the item already exists in the second list, a new item is created instead of updating the existing item

 

Mihiranp_0-1710762721011.png

 

1 best response

Accepted Solutions
best response confirmed by Mihiranp (Copper Contributor)
Solution

@Mihiranp you will need to build a flow in Power Automate.

 

These are the 2 SharePoint lists.

0-SP.png

 

The flow is as follows:

 

1-Flow.png

 

2-Flow.png

 

If one of those 3 columns has changed then get all the items from the CustomerInfo list. If it was a different column that changed then do nothing.

 

3-Flow.png

 

Condition 2 below looks at whether the Title column from the get items action is equal to the CustomerEmail column in the CustomerTickets list. If it is set the boolean variable created earlier to the expression true.

 

4-Flow.png

 

Outside the apply to each add another condition to check if the variable is true. If it is, update the item in the CustomerInfo list, if not create a new item.

 

5-Flow.png

 

In the CustomerTickets list I changed the Isalnd to Guadalupe, the flow then ran and the Island in CustomerInfo was updated to Guadalupe.

 

6-SP.png

 

I would then have a second flow with the when an item is created trigger. Otherwise you have to add more actions (and complexity) to this flow to avoid the never-ending loop where an item is constantly updated.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

View solution in original post