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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Compare SharePoint lis...
Power Automate
Answered

Compare SharePoint list and excel sheet and create/update items that match

(0) ShareShare
ReportReport
Posted on by

I have a sharepoint list and an excel sheet that comes from Document library.

Now I need to compare the Title from the List with the Project Name from the Excel Sheet.

If they are matching then the existing item in the list needs to be updated with the values in Excel, if not a New Item has to be created with the values from Excel.

 

I tried many ways like adding a condition to check the Title with Project Name, if the condition is false then it is creating as many items as the items in sharepoint list.

 

Used a Filter array and compared Title with Project Name and used a condition empty(body(Filter_array)) is true create item, if false update item.

If there is no item matching the body of the Filter array is empty hence it is not creating item.

 

Please suggest me with the solution.

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    I've made a test for your reference,

     

    1\My SP list:

    vbofengmsft_0-1652926619085.jpeg

    2\The Excel table

    vbofengmsft_1-1652926638965.jpeg

    3\The flow

    vbofengmsft_2-1652926654180.jpeg

    vbofengmsft_3-1652926660500.jpeg

    4\The Result

    vbofengmsft_4-1652926707708.jpeg

     

    Best Regards,

    Bof

     

     

     

     

     

     

  • CU21012012-0 Profile Picture
    on at

    This is exactly what I'm trying to do as well.  I was wondering if (1) there are better quality images?  (2) how are you identifying the Excel variables?  Thanks!

  • Community Power Platform Member Profile Picture
    on at

    Same here, exactly what I am looking for but the images that illustrate the flow are not clear enough. Can you please upload them in better quality? Thanks!

  • TracyK Profile Picture
    2 on at

    This looks like what I want however, can not read graphics to duplicate.  Is there anyway to get better pics or some text of what your code is doing?  Thanks

      

  • snydertl Profile Picture
    19 on at

    I was able to recreate with better images.

    In the Apply to Each, make sure the Filter Query matches the field you are trying to compare.

    snydertl_1-1695909447016.png

     

    after that add a condition to compare if the item exists or not.  I wanted to just update the list if an item wasn't in the excel file which is why mine is set to not equal to.

     

    snydertl_2-1695909512687.png

    The expression for the length is length(outputs('Get_items')?['body/value'])

     

    snydertl_3-1695909656820.png

     

    I spent hours trying to figure this out without getting stuck in a loop so thank you v-bofeng-msft for posting this!

     

     

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard