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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / add row to excel not d...
Power Automate
Answered

add row to excel not duplicate

(1) ShareShare
ReportReport
Posted on by 726

I am using flow to add row in an excel table from a sharepoint list I'd like it to check that the item is not already in excel before adding it. 

i'd like to do this by checking that the ID number in the excel spread sheet is not the same as the ID number from sharepoint, if it is not then it will add the row

 

This is what i have at the moment and i am getting duplicates. 

 

amyharkus86_0-1623930283562.png

 

 

 

 

Categories:
I have the same question (0)
  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @amyharkus86  you flow looks correct, can you share the outputs of filter List rows and filter array action from the flow run to further understand on whats going on in the flow when it runs.

  • amyharkus86 Profile Picture
    726 on at

     

    @annajhaveri please see screen shots of the flow once its ran, all looks to be doing as it should, but as you can see from the screen shot of the table within excel test runs it has the same ID number 1449 in this case and there are 3 entries, it should only add it if that number is not already in the spreadsheet. 

    amyharkus86_0-1624270986938.pngamyharkus86_1-1624271003942.pngamyharkus86_2-1624271018825.png

     

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at

    @amyharkus86  from screenshots it looks like the filter array is not working, it doesnt return any matching results, are you sure the SharePoint ID is there in the excel? Need to check in outputs of List rows present in table.

  • amyharkus86 Profile Picture
    726 on at

    @annajhaveri Yes the ID is present in both, here is a snippet from my excel file, as you can see in the second column i have  'ID' this is the ID count from the sharepoint list.

     

    amyharkus86_1-1625740078058.png

     

     

    I have a PowerApps that creates an item in a SharePoint list on submission, then the flow on a new item being created in the SharePoint list adds the row to excel. 

     

     

  • Verified answer
    amyharkus86 Profile Picture
    726 on at

    After further research i found that others have had the same issue, the solution that also worked for me was to re-create my excel spreadsheet, so i copied all the data and formatting across, and re-pointed my flow to my new excel spreadsheet, I am no longer getting duplicates. 

  • oaltheeb Profile Picture
    2 on at

    Could you share how did you point your flow to the new Excel sheet? 

  • amyharkus86 Profile Picture
    726 on at

    @oaltheeb i used the flow function 'When an item is created or edited'

     

    amyharkus86_0-1674122221652.png

    amyharkus86_1-1674122442853.png

    For me Record ID is the name of the field in my excel file that hold the ID 

     

    for the string enter under expression, you may not be able to copy and paste and will need to type it yourself.

    string(triggerOutputs()?['body/ID'])
     
    I then have a condition that is using the outcome of the string in the filter array, Is its empty equals true
    Being if the ID field is empty = true, enter row in to the table. 
     
    amyharkus86_2-1674122590310.png

     

     
     
  • Andrew92 Profile Picture
    2 on at

    Would to be able to provide the Empty string you have in your condition section?

  • amyharkus86 Profile Picture
    726 on at

    @Andrew92 

    empty(body('Filter_array')) 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard