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 / 'No' Condition Creates...
Power Automate
Unanswered

'No' Condition Creates Item in SP List

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2

I am practicing Flow. I created the below.

1. There is an Excel workbook in an SP Library.
2. If the workbook is updated the Flow updates the SP List.
3. The update is based upon a 'Yes/No' condition.
4. The 'Yes' side updates the existing data
5. The 'No' side should create a new item

The 'Yes' side works fine. The 'No' side is mass-producing the existing data from the workbook over and over again. I have to turn it off to stop the process.

How do I edit the 'No' side to ONLY create the new items entered into the workbook and then stop? 

Phineas_0-1660230728537.png

 

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @Phineas ,

    having 'Apply to each' inside another 'Apply to each' means that it'll process all the Excels rows, and for each of them it'll process all the SharePoint items. If there're 10 Excel rows and 10 SharePoint items then it'll run 10*10 times, while the values will be equal only in max. 10 situations.

    Remove one of the loops and use 'Filter array' instead, the principle is the same as described here: https://tomriha.com/how-to-compare-items-in-two-sharepoint-lists-in-power-automate/

    Check if the 'Filter array' returns any items, if it does, it's equal to the Excel row. If it returns an empty array then there's no matching row/item.

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    I'm still struggling.

    I reviewed the link you sent. I thought I followed all the recommendations.

    Still getting multiple new items and copies of old when I use the 'Create item'. To clarify to there is no match to the SP List ID in the Excel, so for testing purposes I'm using the 'Plan' column in both. All items have a unique 'Plan' name for matching purposes.

    My last edit and run created hundreds of repeats that I had to delete.

    Can you tell me whether you think this will achieve my goal as configured?

    Facts:
    1. There is a SP List
    2. There is an Excel workbook (archived in a SP Library)
    3. The workbook is updated with a new version once per week
    4. I am using a 'When an item or file is modified' automated flow

    Desired Outcome:
    1. The upload of a new workbook (of the same name) shall trigger the flow
    2. The flow shall filter for the contents of the 'Plan' column in the workbook
    3. Where the 'Plan' column of the workbook and SP List match any edits to those items in the workbook will be
        reflected in the SP List
    4. Where the 'Plan' is not found in the 'Plan' column of the SP List the flow will write the content of that/those items
        to the SP List.

    If I only have one item in the SP List and I only use the 'Yes' side of the flow the update to the one item works. Once there is more than one item in SP the 'ID' parameter - variable kicks in; A variable that doesn't exist in the Excel workbook.

    Phineas_5-1660252871238.png

     

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @Phineas ,

    you still have 2x 'Apply to each' in the flow, that's why it's creating so many items

    image.png

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Okay; Something about the way I was creating the flow kept adding the extra 'Apply to'. That part has been adjusted.

    I believe my 'Condition' entries are wrong.

    What exactly am I'm entering in each condition and how so that I shows the body as you have it in the condition and the 'Update item'?

    Phineas_2-1660314504130.png

     

    Phineas_5-1660314817169.png

     

     

     

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    All the 3 values I added using the red text must be added as expressions.

    Condition left side (is the output of 'Filter array' empty?):

    empty(body('Filter_array'))

    Condition right side (If it's not empty, the item exists, it'll be equal to 'false'):

    false

    Take the ID from the item that's left in the 'Filter array' output as that's the one you were looking for and which you want to use in the 'Update item' action.

    body('Filter_array')[0]?['Id']

     

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Getting closer.

    The SP List and Excel Workbook started with the top three lines/items.

    I edited one column in each of the lines/items.

    The flow ran and updated the items as desired, but it also made two more copies of those same lines.

    Phineas_1-1660317786268.png


    Phineas_0-1660317694268.png

     

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    I'm still looking to finish this flow, please.

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @Phineas ,

    if it's creating items instead of updating then there must be something wrong with the 'Filter array' action or with the 'Condition'. Go to the flow run history and check what happened in the flow.

    - how many loops did run?

    - what was the result of the 'Filter array', was it always just a single item?

    - is the 'Condition' written correctly?

  • Verified answer
    Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Got the following to work.

    Phineas_0-1662131741951.png

     

  • abhacshah Profile Picture
    4 on at

    Can you please show your exact condition

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard