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 / Creating items in List...
Power Automate
Unanswered

Creating items in List B from List A. If it does not exist, Create it. If it does exist, Update it.

(0) ShareShare
ReportReport
Posted on by 920 Super User 2024 Season 1

Hi,

 

How do I NOT create duplicate records when copying from List A to List B?  If it does not exist, Create it. If it does exist, Update it.

I am having trouble with this, ive tried doing the filter query part that some people do - but it hasnt worked for me.

 

Current Workflow im using , it currently creates duplicates each time this is ran.

wonka1234_1-1669912637848.png

 

 

Categories:
I have the same question (0)
  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    Trying something new, still not working:

     

    wonka1234_0-1669927170202.png

     
     

    wonka1234_3-1669927195571.png

     

     

  • v-chengfen-msft Profile Picture
    Microsoft Employee on at

    Hi @wonka1234 ,

    Do you want:
    1. Trigger flow when listA has a new record or is modified.
    2. Determine whether this record exists in listB.
    3. If it exists, update this record, if it does not exist, create a new record
    Here is test for your reference:
    Here is listA:
    vchengfenmsft_2-1669946679344.png
    Here is listB:
    vchengfenmsft_3-1669946716571.png

    Here is flow:

    vchengfenmsft_0-1669946404212.pngvchengfenmsft_1-1669946411873.png

    Here is result:

    1.create new item

    vchengfenmsft_4-1669946789491.png

    vchengfenmsft_5-1669946827065.png

    2.Modify item

    vchengfenmsft_6-1669946896712.pngvchengfenmsft_7-1669947289772.png

     

    Best Regards

    Cheng Feng

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    To confirm the logic - 

    I would like to create or update the item in list B. I believe that is what you have made.

     

    I have replicated your flow - it does not work as expected. Nothing is coming to List B.

     

    Couple of things - 

    Title in list B is renamed something else in the actual List B.  in List A this is "Request_ID" , not sure if that throws off the filter part.

     

    wonka1234_0-1669996458972.png

     

     

    secondly I notice my apply to each statement is formed twice, instead of once for you.

     

    wonka1234_1-1669996524546.png

     

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @v-chengfen-msft 

     

    new screenshots - hope they are useful.

     

     

    wonka1234_2-1670014247074.png

     

     

    wonka1234_3-1670014256204.png

     

     

    current result - nothing is being written to List B

     

     

  • v-chengfen-msft Profile Picture
    Microsoft Employee on at

    Hi @wonka1234 ,

    The cause of this problem is:
    1. You use the return value of get items to fill 【Create item】.

    When the Blist has no Alist item, the Value return value of [Get items] is empty, and you use an empty value to create an item, and of course the result is also empty.
    Please use the trigger's return value as padding.

     

    vchengfenmsft_0-1670208171466.png

     

     

    Best Regards

    Cheng Feng

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @v-chengfen-msft  What does padding mean? 

     

    My:  Yes condition Create Item are "triggers"

    on the right side No Condition,  My values are all "items apply to each" except for "Request_ID" which is a "trigger".

     

    Is this correct?

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
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard