I have a SharePoint List that I'm trying to compare the items to an Excel spreadsheet. If an item in the Excel is not in the SharePoint List I want it to be added as a new line item.
Excel:
Customer
Acme
Acme Brick
SharePoint List
Customer
Acme
Acme inc.
Expected Result
Customer
Acme
Acme inc.
Acme Brick
The issue I'm facing is when the Flow runs it is creating 4 entries for each item in the SharePoint List
Actual Result:
Customer
Acme
Acme inc.
Acme Brick
Acme Brick
Acme Brick
Acme Brick
Solved! Go to Solution.
I have created an example that should work for you.
Please note the Query Filter in the Get Items action
I loop through each row of Excel data.
The Query Filter limits the results from Get Items to those where the Customer match the Title
If Get Items does not return a row, I create a new item.
My expression in the condition is in the comments section.
Hi @PowerNoob ,
Thanks for the good explanation with examples.
Looks like your loop Apply to each is wrong here.
After the List rows present in a table Add the Apply to each loop.
Then inside th loop add the Get Items and set the Count property to 1 with other filters.
Check the count of the result whether its zero or more than zero.
Add the next Apply to each loop under the no condition.
If you need anymore help let me know.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video Tutorials@abm Thanks for the response.
I tried what you mentioned below or at least how I understood it and still getting the same result with multiple entries for one item
I have created an example that should work for you.
Please note the Query Filter in the Get Items action
I loop through each row of Excel data.
The Query Filter limits the results from Get Items to those where the Customer match the Title
If Get Items does not return a row, I create a new item.
My expression in the condition is in the comments section.
Hi @PowerNoob & @ScottShearer ,
I was about to finish an example then saw the post.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsDive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
40 | |
36 | |
36 | |
36 | |
28 |
User | Count |
---|---|
39 | |
39 | |
34 | |
30 | |
25 |