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 / Delete row from Excel ...
Power Automate
Unanswered

Delete row from Excel if the list item is deleted from SharePoint

(0) ShareShare
ReportReport
Posted on by 17

Morning All,

 

I was working off another post asking the same info but when I follow how they created the flow for the solution it always triggers as True and doesn't delete the row. If I try and modify the flow it then wants to add an apply all and tried to delete the entire list.

 

The same rows/columns are in the excel sheet and the SharePoint list. But the unique trigger to each row would be 'Question'.

 

https://powerusers.microsoft.com/t5/Power-Automate-User-Groups/Delete-item-from-excel-if-the-list-item-is-deleted-from/m-p/1245809#M140

 

There's the original post I found, any help would be greatly appreciated.

 

Capture.PNG

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    I think your problem is in the Filter Array action.  You changed the ID to Question, but the right side of the filter is still a String() function, which shouldn't be necessary since Question would already be a string.  Did you change the right side of the filter to point to the Question column?  If not you'll always end up with an empty array.

  • JileMeyn Profile Picture
    17 on at

    I didn't have the option for "Item ID", I tried the other 3 options (value, body, body/value - item) that weren't the names for the rows of the table but each of them did the same thing.

     

    In filter array enter: string(triggerOutputs()?['body/ID'])

    In condition: empty(body('Filter_array'))

     

    Tried using those as well from the original solution and still the same result either deleted all rows, or did nothing.

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    You have to filter the array by using some value that is both in Excel and SharePoint.  Otherwise you aren't matching the row.  Since you are trying to delete a matching row, what value is in both data sets.  That is what you want to filter on.

  • JileMeyn Profile Picture
    17 on at

    Sorry I am not sure I follow, would you be able to show an example? I thought I tried setting it up based on a unique value for each document "Question" 

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    You may be able to filter on Question.  But if you are filtering using Question then what is on the right side of the equals?  All I can see in the Screenshot is String().  Since Question is already a String you wouldn't need that formula.  It would be something different.  So I suspect you are trying to compare question to an ID row, which is what the blog had in the right side.  So what is inside your string() function?

  • JileMeyn Profile Picture
    17 on at
    string(triggerOutputs()?['item/Question'])
  • JileMeyn Profile Picture
    17 on at
    empty(body('Filter_array'))
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    First, the question should already be a string so you don't need the String function.  triggerOutputs()?['item/Question'] should be enough.  To troubleshoot use a couple of compose actions just before the filter array to check the values being used on the right and the left side of the filter.  The delete trigger doesn't return all the data of the item that was deleted, so question may not be available in the triggerOutputs.

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard