web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copy items between two...
Power Automate
Answered

Copy items between two SharePoint lists

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all.

 

I have a problem copying data between two SharePoint lists, and I cannot figure out what causes the problem. I have two SharePoint lists (SharePointBooks and SharePointBooksDestination). When a new item is created in SharePoint Books or modified, i Want the changes to be updated in the SharePointBooksDestination list.

 

I have read a ton of documentation for example this one from MS:

MS support article

And I have found this article on this great forum:

https://powerusers.microsoft.com/t5/Building-Flows/Copying-items-between-lists-using-filtering/m-p/269629#M27390

 

The last article gave me some good hints, and it works almost perfect. The challenge is that, no matter if I create or modify a item in the SharePointBooks list, it will always create a new item in the destination list. This should only happen whaen I create a new list item. I have some pictures of the flow:Flow01.PNG

I have a column in the destination list (MasterID) where I store the ID from the SharePointBook list, and I use these as a filter.Flow02.PNG

In the condition I have this expressionFlow03.PNG

And i the value I have this expression.

When I look at the flows that has been running, they all seems to create a new item, no matter what, and I can see from the flows that has been running, that the body is empty. Se below:Flow04.PNG

Does anyone knos how to fiks this? The flow works fine with no errors, but I only need to create new list items when the item is not in the destination list.

 

Greetings From Denmark

/Frank

Categories:
I have the same question (0)
  • Verified answer
    jwhite Profile Picture
    191 on at

    Hi @Anonymous,

    Could you try usingthe expression

    length(body('Get_items')?['value'])

    is equal to 0 for your condition as below?

    LengthCondition.png

     

    This is essentially checking the length of the array returned by your filter query. If there are not items returned, the length should be 0.

    Let me know if this helps, if it doesn't I'm sure we can figure something else out!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @jwhite and THX for quick reply. I have tried your solution, but it still keeps going on with creating a new item instead af updating the existing item 😞

     

    I have changed the Filter Query to "Title eq 'Title' (from Dynamic content).

    The output from the trigger:Flow05.PNG

     

    The Filter Query from the Get Items actionFlow06.PNG

    So I am a bit frustrated right now. The condition says, that if the expression length(body('Get_items')?['value']) is equal to 0 then create a new item, but it still creates new items when I make changes to existing items.

     

    I have tried to change the value in the condition to true, but it does not change anything :(:(:(

     

    /Frank

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    UPDATE UPDATE UPDATE

    Hi again @jwhite. I do not know what I did, but suddenly the flow seems to work as intended from your suggestion. I am SO happy. I have spent hours and hours to make it work.

     

    Have an awesome day

     

    /Frank

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @jwhite and sorry for writing again, but I have another issue with this challenge that i can not figure out.

     

    In the parent list I have a checkbox, and it shoud only be items were the value in the checkbox is equal to True that shoudl be copyed to the destination list. I have tried to make a AND/OR condition in Flow but it seems not to help. In need this:

     

    Parent list
    If an items is created or modified AND the checkbox is equal to True

    1. Chek if the items exists in the Destination list
    2. If not - create item
    3. If it exist - update item

    Hope you understand my challenge here. Do you have any suggestion to a solution? I can not figure out why a simple condition will not work for me 😞

     

    /Frank

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard