Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Save records without duplicates

(0) ShareShare
ReportReport
Posted on by 2

Hi, 

 

I have a sharepoint list called "Records". I want to save new records from excel. I used List rows present in a table, I want to save records, without duplicates. 

 

In records there is a column named "IDPart". In excel I have the same column IDPart, I want to save the records, but if a IDPart already exist in Records skip. 

 

 

 

  • v-yetonggu-msft Profile Picture
    on at
    Re: Save records without duplicates

    Hi @LuisDataReady ,

    I have observed that your IDPart is a Number column in the SharePoint list.

    What type of column is the IDPart in your excel list? Is it also a Number column?
    As a reminder, in Flow's equal, the data types on both sides must be the same to be equal.

    vyetonggumsft_0-1713489013901.png

    Best Regards,

    Sunshine Gu

  • LuisDataReady Profile Picture
    2 on at
    Re: Save records without duplicates

    Hi, 

    I tested the flow, but it stills duplicate the items. 

     

    LuisDataReady_0-1713450316585.png

     

     

    IDPart duplicates. When I see the flow is because the condition is true and create the item again

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

     

  • ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on at
    Re: Save records without duplicates

    Hi @LuisDataReady 

     

    Here are the steps, assuming you already have "Get items" action that contains the list items:

     

    After "List rows present in a table", add "Apply to each" action and pass the output value object of SharePoint get items action as its input. Within apply to each block, add "Filter array" action & pass the output value object from "List rows present in a table" action as its input & in filter query compare the ID with each list item in iteration. Next, add "Condition" action to determine the length of output body return by filter array action. using expression, check if length of output body of filter array is zero and add a row in excel in the "Yes" block.

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

      

  • v-yetonggu-msft Profile Picture
    on at
    Re: Save records without duplicates

    Hi @LuisDataReady ,

    I did a test for your reference.

    In my scenario:
    My SharePoint List:

    vyetonggumsft_1-1713424049469.png

    My Excel Table:

    vyetonggumsft_0-1713424007810.png

    My Flow:

    vyetonggumsft_0-1713424280586.png

    vyetonggumsft_1-1713424359140.png

     

    IDPart eq '@{items('Apply_to_each')?['IDPart']}'
    length(outputs('Get_items')?['body/value'])

     

    The Result:

    vyetonggumsft_2-1713424119803.png

    Best Regards,

    Sunshine Gu

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1